/**
 * Art Photography for WooCommerce - Compact Options CSS
 * Version: 1.0.72
 *
 * This file contains styles for the compact-style purchase options
 * used in the secondary options (print size, framing, shipping)
 * and collapsible section functionality
 * 
 * Updated with improved responsive design for small screens
 */

/* Compact Option Base Styles */
.compact-option {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    background-color: #fff;
}

.compact-option:hover {
    border-color: #aaa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.compact-option.selected {
    border-color: #4a6741;
    border-left-width: 4px;
    padding-left: 9px; /* Compensate for the wider border */
}

/* Hide actual radio button */
.compact-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Radio Button */
.compact-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    margin-top: 3px;
}

.compact-radio .custom-radio {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all 0.2s;
}

.compact-option.selected .custom-radio {
    border-color: #4a6741;
}

.compact-option.selected .custom-radio:after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4a6741;
    display: block;
}

/* Option Label Container */
.compact-label {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 3px;
}

/* Price Display */
.compact-price {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-left: 10px;
}

/* Option Description */
.compact-description {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    padding-left: 28px; /* align with option label */
    margin-top: -3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .compact-option {
        padding: 8px 10px;
    }
    
    .compact-label {
        font-size: 12px;
    }
    
    .compact-description {
        font-size: 11px;
    }
}

/* Extra small screen optimization for iPhone */
@media (max-width: 480px) {
    .compact-option {
        padding: 8px;
    }
    
    .compact-radio {
        margin-right: 10px;
    }
    
    .compact-label {
        font-size: 11px;
    }
    
    .compact-description {
        font-size: 10px;
        padding-left: 26px;
    }
    
    .compact-price {
        font-size: 11px;
    }
}

/* Collapsible Section Styles */
.option-section.collapsible {
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.option-section.collapsible .option-title {
    position: relative;
    padding: 15px;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-section.collapsible .collapsible-header {
    display: flex;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

.option-section.collapsible .section-title-text {
    white-space: nowrap;
    margin-right: 8px;
}

.option-section.collapsible .collapse-indicator {
    position: relative;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.option-section.collapsible .collapse-indicator:before,
.option-section.collapsible .collapse-indicator:after {
    content: '';
    position: absolute;
    background-color: #555;
    transition: all 0.3s ease;
}

.option-section.collapsible .collapse-indicator:before {
    width: 14px;
    height: 2px;
    top: 6px;
    left: 0;
}

.option-section.collapsible .collapse-indicator:after {
    width: 2px;
    height: 14px;
    top: 0;
    left: 6px;
}

.option-section.collapsible.collapsed .collapse-indicator:after {
    transform: rotate(90deg);
}

.option-section.collapsible .collapsible-content {
    max-height: 1000px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    padding: 0 15px 15px;
    overflow: hidden;
}

.option-section.collapsible.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Selected Option Preview */
.selected-option-preview {
    margin-left: auto;
    font-size: 13px;
    color: #4a6741;
    font-weight: 500;
    padding-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50%;
}

/* Responsive adjustments for collapsible sections */
@media (max-width: 768px) {
    .option-section.collapsible .option-title {
        padding: 12px;
    }
    
    .selected-option-preview {
        font-size: 12px;
        max-width: 40%;
    }
}

/* Extra small screen optimizations for iPhone */
@media (max-width: 480px) {
    .option-section.collapsible .option-title {
        padding: 10px 8px;
    }
    
    .option-section.collapsible .section-title-text {
        font-size: 15px;
    }
    
    .selected-option-preview {
        font-size: 11px;
        max-width: 120px; /* Fixed width instead of percentage for more control */
        padding-right: 4px;
    }
    
    .option-section.collapsible .collapse-indicator {
        width: 12px;
        height: 12px;
        margin-left: 8px;
    }
    
    .option-section.collapsible .collapse-indicator:before {
        width: 12px;
        top: 5px;
    }
    
    .option-section.collapsible .collapse-indicator:after {
        height: 12px;
    }
    
    .option-section.collapsible .collapsible-content {
        padding: 0 10px 10px;
    }
}

/* Exclusive Buyout — print size "Included" label */
.buyout-included-label {
    font-style: italic;
    color: #5a6a51;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.01em;
}
