/* ====== UNIFIED CREATIVE MODAL STYLES - EXTENSION FOR ALL MODALS ====== */
/* This extends the auth modal styles for all other modals in the app */

/* General Modal Extensions */
.unified-creative-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.9) 50%,
        rgba(51, 65, 85, 0.85) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.creative-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Floating Dreams Background for Content Modals */
.creative-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-creative-element {
    position: absolute;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.08);
    animation: floatCreative 20s infinite linear;
}

.floating-creative-element:nth-child(1) { 
    top: 15%; 
    left: 8%; 
    animation-delay: 0s;
}

.floating-creative-element:nth-child(2) { 
    top: 25%; 
    right: 12%; 
    animation-delay: 2s;
}

.floating-creative-element:nth-child(3) { 
    bottom: 35%; 
    left: 15%; 
    animation-delay: 4s;
}

.floating-creative-element:nth-child(4) { 
    bottom: 20%; 
    right: 20%; 
    animation-delay: 3s;
}

.floating-creative-element:nth-child(5) { 
    top: 60%; 
    left: 3%; 
    animation-delay: 1s;
}

.floating-creative-element:nth-child(6) { 
    top: 80%; 
    right: 8%; 
    animation-delay: 5s;
}

@keyframes floatCreative {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.08;
    }
    25% {
        transform: translateY(-15px) rotate(90deg);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.2;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.12;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.08;
    }
}

/* Creative Modal Container */
.unified-creative-modal {
    position: relative;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 250, 252, 0.96) 100%
    );
    border-radius: 24px;
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 600px;
    max-height: 100vh;
    overflow: hidden;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 800px;
}

.unified-creative-modal.large {
    max-width: 800px;
}

.unified-creative-modal.extra-large {
    max-width: 1000px;
}

/* Creative Modal Header */
.unified-creative-header {
    position: relative;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 100%
    );
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}



.creative-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.creative-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64748b, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.3);
    position: relative;
    overflow: hidden;
}

.creative-modal-icon i {
    font-size: 1.5rem;
    color: white;
    z-index: 2;
}

.creative-modal-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    animation: iconShine 4s infinite;
    transform: rotate(45deg);
}

@keyframes iconShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.creative-title-section {
    flex: 1;
}

.creative-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
    background: linear-gradient(135deg, #64748b, #1e293b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.creative-modal-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.creative-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.creative-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

/* Creative Modal Body */
.unified-creative-body {
    padding: 0 2rem 2rem;
    overflow-y: auto;
    max-height: calc(95vh - 120px);
    position: relative;
}

.unified-creative-body::-webkit-scrollbar {
    width: 8px;
}

.unified-creative-body::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

.unified-creative-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
}

.unified-creative-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

/* Enhanced Form Styles */
.creative-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.creative-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.creative-form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.creative-form-group.full-width {
    grid-column: 1 / -1;
}

.creative-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.creative-form-label i {
    color: #64748b;
    font-size: 0.875rem;
}

.creative-form-input,
.creative-form-textarea,
.creative-form-select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.8);
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.3s ease;
    box-sizing: border-box;
    position: relative;
}

.creative-form-input:focus,
.creative-form-textarea:focus,
.creative-form-select:focus {
    outline: none;
    border-color: #64748b;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
    transform: translateY(-1px);
}

.creative-form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.creative-form-textarea.large {
    min-height: 200px;
}

/* Input Icons */
.creative-input-container {
    position: relative;
}

.creative-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.creative-form-input:focus ~ .creative-input-icon,
.creative-form-textarea:focus ~ .creative-input-icon,
.creative-form-select:focus ~ .creative-input-icon {
    color: #64748b;
}

/* Enhanced Buttons */
.creative-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.creative-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    justify-content: center;
}

.creative-btn-primary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.3);
}

.creative-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(100, 116, 139, 0.4);
    background: linear-gradient(135deg, #475569, #334155);
}

.creative-btn-secondary {
    background: rgba(248, 250, 252, 0.8);
    color: #64748b;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.creative-btn-secondary:hover:not(:disabled) {
    background: rgba(226, 232, 240, 0.8);
    border-color: #64748b;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.creative-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.creative-btn-loading {
    position: relative;
    pointer-events: none;
}

.creative-btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tags Input Styling */
.creative-tags-container {
    position: relative;
}

.creative-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 20px;
}

.creative-tag-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #475569;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.creative-tag-remove {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
    transition: color 0.3s ease;
}

.creative-tag-remove:hover {
    color: #ef4444;
}

/* Checkbox Styling */
.creative-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.creative-checkbox-container:hover {
    background: rgba(226, 232, 240, 0.3);
    border-color: #cbd5e1;
}

.creative-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.creative-checkbox:checked {
    background: linear-gradient(135deg, #64748b, #475569);
    border-color: #64748b;
}

.creative-checkbox:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Image Preview Styling */
.creative-image-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(248, 250, 252, 0.8);   
    border: 2px solid #e2e8f0;
    padding: 1rem;
    text-align: center;

}

.creative-preview-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.creative-image-button {
    margin-top: 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid #cbd5e1;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #475569;
}

.creative-image-button:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-color: #94a3b8;
    transform: translateY(-1px);
}

/* Help Text */
.creative-form-help {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.creative-form-help i {
    color: #94a3b8;
}

/* Decorative Elements */
.creative-modal-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
}

.creative-decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.08), rgba(71, 85, 105, 0.04));
}

.creative-decoration-1 {
    width: 100px;
    height: 100px;
    top: -50px;
    right: -50px;
    animation: creativeFloat 8s ease-in-out infinite;
}

.creative-decoration-2 {
    width: 60px;
    height: 60px;
    bottom: -30px;
    left: -30px;
    animation: creativeFloat 10s ease-in-out infinite reverse;
}

.creative-decoration-3 {
    width: 80px;
    height: 80px;
    top: 40%;
    left: -40px;
    animation: creativeFloat 12s ease-in-out infinite;
}

@keyframes creativeFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.08;
    }
    50% {
        transform: translateY(-15px) scale(1.1);
        opacity: 0.15;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .unified-creative-modal {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 20px;
    }
    
    .unified-creative-modal.large,
    .unified-creative-modal.extra-large {
        max-width: 100%;
    }
    
    .unified-creative-header {
        padding: 1.5rem 1.5rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .creative-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .unified-creative-body {
        padding: 0 1.5rem 1.5rem;
    }
    
    .creative-modal-icon {
        width: 50px;
        height: 50px;
    }
    
    .creative-modal-icon i {
        font-size: 1.25rem;
    }
    
    .creative-modal-title {
        font-size: 1.5rem;
    }
    
    .creative-modal-subtitle {
        font-size: 0.875rem;
    }
    
    .creative-form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .creative-form-input,
    .creative-form-textarea,
    .creative-form-select {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .creative-input-icon {
        left: 0.875rem;
        font-size: 0.875rem;
    }
    
    .creative-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .creative-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .creative-modal-close {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .unified-creative-overlay {
        padding: 0.25rem;
    }
    
    .unified-creative-modal {
        margin: 0.25rem;
        border-radius: 16px;
    }
    
    .unified-creative-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .unified-creative-body {
        padding: 0 1rem 1rem;
    }
    
    .creative-modal-title {
        font-size: 1.25rem;
    }
    
    .creative-modal-close {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .creative-form-group {
        margin-bottom: 1rem;
    }
    
    .creative-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unified-creative-modal {
        border: 2px solid #000;
        background: #fff;
    }
    
    .creative-form-input,
    .creative-form-textarea,
    .creative-form-select {
        border-color: #000;
    }
    
    .creative-btn-primary {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-creative-element,
    .creative-modal-icon::before,
    .creative-decoration-circle {
        animation: none;
    }
    
    .unified-creative-modal *,
    .creative-btn {
        transition-duration: 0.01ms !important;
    }
    
    .creative-btn:hover {
        transform: none !important;
    }
}

/* Extended styles for community modals */

/* Character Counter */
.creative-character-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Privacy Options */
.creative-privacy-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
    color : #1e293b;
}

.creative-privacy-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.creative-privacy-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(109, 40, 217, 0.5);
    transform: translateY(-2px);
}

.creative-privacy-option:has(.creative-radio:checked) {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.2), rgba(245, 158, 11, 0.2));
    border-color: rgba(109, 40, 217, 0.8);
    box-shadow: 0 8px 32px rgba(109, 40, 217, 0.25);
}

.creative-radio {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.creative-privacy-content {
    flex: 1;
}

.creative-privacy-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;

    margin-bottom: 0.25rem;
}

.creative-privacy-title i {
    color: var(--primary-color);
}

.creative-privacy-description {
    
    font-size: 0.875rem;
}

/* Selected Image Styling */
.creative-selected-image {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.creative-image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.creative-image-remove:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

/* Add Tag Button Specific Styling */
.creative-add-tag-btn {
    margin-top: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    min-width: auto !important;
}

/* Checkbox Label Styling */
.creative-checkbox-label {
    margin: 0 !important;
    cursor: pointer !important;
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    .creative-privacy-options {
        gap: 0.75rem;
    }
    
    .creative-privacy-option {
        padding: 0.875rem;
    }
    
    .creative-privacy-title {
        font-size: 0.9rem;
    }
    
    .creative-privacy-description {
        font-size: 0.8rem;
    }
    
    .creative-character-counter {
        font-size: 0.8rem;
    }
}