/**
 * Frame Selector Styles
 * Styling for frame and color selection interface
 */

/* Step Layout */
.lm-stl-step {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lm-stl-step h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2271b1;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

/* Frame Cards Grid */
.frame-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.frame-card {
    position: relative;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.frame-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
}

.frame-card.selected {
    border-color: #2271b1;
    background: #f0f6fb;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.2);
}

.frame-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #2271b1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 15px;
    background: #f0c419;
    color: #333;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.frame-size {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 8px 0;
}

.frame-description {
    font-size: 14px;
    color: #666;
    margin: 8px 0 12px;
    line-height: 1.4;
}

.frame-specs {
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    font-size: 13px;
}

.spec-label {
    color: #666;
    font-weight: 500;
}

.spec-value {
    color: #333;
    font-weight: 600;
}

.frame-price {
    font-size: 22px;
    font-weight: bold;
    color: #2271b1;
    margin-top: 12px;
    text-align: right;
}

/* Color Swatches */
.color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-swatch:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
    transform: translateY(-2px);
}

.color-swatch.selected {
    border-color: #2271b1;
    background: #f0f6fb;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.color-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-align: center;
}

.color-price {
    font-size: 14px;
    font-weight: bold;
    color: #2271b1;
}

/* Summary Section */
.lm-stl-summary {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-section h4,
.price-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 500;
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    vertical-align: middle;
}

.no-selection {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Price Display */
.price-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f0f6fb;
    border-radius: 8px;
    padding: 20px;
}

.price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.price-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-amount {
    font-size: 32px;
    font-weight: bold;
    color: #2271b1;
}

/* Loading States */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading-spinner::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.error {
    color: #d63638;
    padding: 15px;
    background: #fef0f0;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    margin: 15px 0;
}

/* Hints */
.color-hint {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Limit Info */
.limit-info {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .frame-cards {
        grid-template-columns: 1fr;
    }

    .color-swatches {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .lm-stl-summary {
        grid-template-columns: 1fr;
    }

    .price-section {
        order: -1;
    }

    .frame-card {
        padding: 15px;
    }

    .frame-size {
        font-size: 18px;
    }

    .frame-price {
        font-size: 20px;
    }

    .price-amount {
        font-size: 28px;
    }
}

@media screen and (max-width: 480px) {
    .lm-stl-step {
        padding: 15px;
    }

    .frame-cards,
    .color-swatches {
        gap: 10px;
    }

    .color-swatches {
        grid-template-columns: repeat(2, 1fr);
    }
}
