/**
 * Instagram Safe Zone Checker - CreatorFlow Free Tool
 * Brand Colors: #000000 (black), #d1fe17 (lime green)
 * NO box-shadows, NO gradients, ONLY #000000 for dark backgrounds
 */

/* Import base tool styles from chat link generator */
@import './instagram-chat-link-generator.css';

/* ============================================
   UPLOAD ZONE
   ============================================ */

.upload-zone {
    border: 2px dashed #e5e7eb;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: #d1fe17;
    background: #ffffff;
}

.upload-zone.dragover {
    border-color: #d1fe17;
    background: #fffff7;
}

.upload-icon {
    color: #6b7280;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

/* ============================================
   PREVIEW CONTAINER
   ============================================ */

.tool-card--preview {
    max-width: 100%;
    padding: 2rem 1.5rem;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.preview-phone {
    position: relative;
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
}

.preview-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000000;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   SAFE ZONE OVERLAYS
   ============================================ */

.safe-zone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.safe-zone-overlay.hidden {
    opacity: 0;
}

/* UI Overlays */
.ui-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.ui-overlay--top {
    top: 0;
    left: 0;
    width: 60%;
    height: 15%;
    border-bottom-right-radius: 0.5rem;
}

.ui-overlay--right {
    top: 30%;
    right: 0;
    width: 15%;
    height: 40%;
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.ui-overlay--bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25%;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.ui-label {
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 0 0.5rem;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Safe Zone Indicator (visible area) */
.safe-zone-indicator {
    position: absolute;
    top: 15%;
    left: 5%;
    right: 15%;
    bottom: 25%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safe-zone-box {
    width: 100%;
    height: 100%;
    border: 2px solid #d1fe17;
    border-radius: 0.5rem;
}

/* ============================================
   PREVIEW ACTIONS
   ============================================ */

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 375px;
}

.preview-actions .btn {
    width: 100%;
    justify-content: center;
}

/* ============================================
   UI ZONES GRID
   ============================================ */

.ui-zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.ui-zone-card {
    background: #f9fafb;
    padding: 1.75rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ui-zone-card:hover {
    border-color: #d1fe17;
    background: #ffffff;
}

.ui-zone-card__icon {
    width: 56px;
    height: 56px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d1fe17;
    flex-shrink: 0;
}

.ui-zone-card__icon svg {
    color: #000000;
    stroke-width: 2;
}

.ui-zone-card__content {
    flex: 1;
}

.ui-zone-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.ui-zone-card__text {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .upload-zone {
        padding: 2rem 1.5rem;
        min-height: 250px;
    }

    .upload-icon {
        width: 40px;
        height: 40px;
    }

    .upload-text {
        font-size: 1rem;
    }

    .upload-hint {
        font-size: 0.875rem;
    }

    .tool-card--preview {
        padding: 1.5rem 1rem;
    }

    .preview-phone {
        max-width: 100%;
    }

    .preview-actions {
        max-width: 100%;
    }

    .preview-actions .btn {
        font-size: 0.9375rem;
        padding: 0.75rem 1rem;
    }

    .ui-zones-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ui-zone-card {
        padding: 1.5rem;
    }

    .ui-zone-card__icon {
        width: 48px;
        height: 48px;
    }

    .ui-zone-card__icon svg {
        width: 28px;
        height: 28px;
    }

    .ui-label {
        font-size: 0.5625rem;
    }
}

@media (max-width: 430px) {
    .upload-zone {
        padding: 1.5rem 1rem;
        min-height: 200px;
    }

    .upload-icon {
        width: 36px;
        height: 36px;
    }

    .upload-text {
        font-size: 0.9375rem;
    }

    .upload-hint {
        font-size: 0.8125rem;
    }

    .tool-card--preview {
        padding: 1rem;
    }

    .ui-zone-card {
        padding: 1.25rem;
    }

    .ui-zone-card__icon {
        width: 44px;
        height: 44px;
    }

    .ui-zone-card__icon svg {
        width: 24px;
        height: 24px;
    }

    .ui-label {
        font-size: 0.5rem;
    }

    /* Adjust overlay sizes for smaller screens */
    .ui-overlay--top {
        height: 12%;
    }

    .ui-overlay--right {
        width: 12%;
    }

    .ui-overlay--bottom {
        height: 22%;
    }

    .safe-zone-indicator {
        top: 12%;
        right: 12%;
        bottom: 22%;
    }
}

/* Tablet landscape */
@media (min-width: 640px) and (max-width: 1024px) {
    .preview-phone {
        max-width: 320px;
    }

    .preview-actions {
        max-width: 320px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .upload-zone {
        min-height: 350px;
    }

    .tool-card--preview {
        padding: 3rem 2rem;
    }

    .ui-zones-grid {
        gap: 2rem;
    }

    .ui-zone-card {
        padding: 2rem;
    }
}
