/* Mobile Cover Simulator Styles */

.mcs-simulator-wrapper {
    margin: 30px 0;
    padding: 30px;
    background: #fff; /* plain white */
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    position: relative;
}

.mcs-simulator-wrapper h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.mcs-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.mcs-brand-selector,
.mcs-model-selector {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.mcs-brand-selector label,
.mcs-model-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.mcs-brand-selector select,
.mcs-model-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mcs-brand-selector select:hover,
.mcs-model-selector select:hover {
    border-color: #999;
}

.mcs-brand-selector select:focus,
.mcs-model-selector select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.mcs-simulator-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 360px;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    overflow: hidden;
}

.mcs-preview-stage {
    width: min(320px, 100%);
    aspect-ratio: 1 / 1;
    background: #fff; /* remove gradient */
    border-radius: 20px;
    box-shadow: none; /* remove all shadows */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mcs-preview-stage::before { /* no inner highlight */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
    box-shadow: none;
}

.mcs-preview-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #fff; /* plain white */
    border-radius: 18px;
    box-shadow: none; /* remove inner border */
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mcs-preview-frame.is-loaded {
    opacity: 1;
}

.mcs-phone-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* fill and crop */
    object-position: center center; /* keep perfectly centered */
    transform-origin: center center;
    pointer-events: none;
    z-index: 2;
}

/* Do not use overlay placeholder; keep it hidden */
.mcs-placeholder {
    display: none !important;
}

.mcs-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.mcs-placeholder svg {
    width: 120px;
    height: 120px;
    opacity: 0.9;
}

.mcs-placeholder p {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.mcs-selected-model-info {
    margin-top: 25px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.mcs-selected-model-info p {
    margin: 0;
    font-size: 15px;
    color: #333;
}

.mcs-selected-model-info strong {
    color: #0073aa;
}

.mcs-validation {
    margin-top: 10px;
    color: #b00020;
    font-size: 14px;
}

.mcs-simulator-wrapper.loading .mcs-preview-stage {
    opacity: 0.6;
    pointer-events: none;
}

.mcs-simulator-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: rgba(0, 0, 0, 0.35);
    animation: mcs-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes mcs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mcs-simulator-wrapper {
        padding: 20px;
    }

    .mcs-controls {
        flex-direction: column;
        gap: 15px;
    }

    .mcs-brand-selector,
    .mcs-model-selector {
        max-width: 100%;
    }

    .mcs-simulator-container {
        min-height: 320px;
        padding: 24px;
    }

    .mcs-preview-stage {
        width: min(260px, 100%);
    }
}

.mcs-thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mcs-thumbnail-item {
    width: 60px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.mcs-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mcs-thumbnail-item:hover {
    border-color: #999;
}

.mcs-thumbnail-item.active {
    border-color: #0073aa;
}
