/* AI Marketplace Gallery Popup Styles */
.aim-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    display: none;
    justify-content: center;
    align-items: center;
}

.aim-popup-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.aim-popup-overlay.aim-visible .aim-popup-container {
    transform: scale(1);
    opacity: 1;
}

.aim-popup-title {
    font-size: 24px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center !important;
}

.aim-popup-message {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #34495e;
    text-align: center !important;
}

.aim-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.aim-popup-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.aim-popup-button:active {
    transform: scale(0.97);
}

.aim-popup-button-yes {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.aim-popup-button-yes:hover {
    background: linear-gradient(135deg, #5a6ed8, #673f91);
}

.aim-popup-button-no {
    background-color: #e1e4e8;
    color: #333;
}

.aim-popup-button-no:hover {
    background-color: #d1d5db;
}

.aim-popup-view {
    display: none;
}

.aim-popup-view.active {
    display: block;
}

.aim-tag-input-wrapper {
    margin-bottom: 30px;
}

#aim-tag-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

/* ========================================
   Checkout Page Integration Styles
   ======================================== */

.aim-checkout-share-section {
    background: linear-gradient(135deg, #f8f9fb, #f1f3f5);
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    text-align: center !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Override Ettore theme WooCommerce order received specific styles */
.woocommerce-order-received .aim-checkout-share-section,
.woocommerce-order-received .aim-checkout-share-section *,
.woocommerce-order-received .aim-checkout-share-title,
.woocommerce-order-received .aim-checkout-share-description,
.woocommerce-order-received .aim-checkout-share-button {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Specific override for description alignment in WooCommerce context */
.woocommerce-order-received .aim-checkout-share-description {
    display: block !important;
    width: 100% !important;
    margin: 0 auto 20px auto !important;
}

.aim-checkout-share-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.aim-checkout-share-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.aim-checkout-share-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center !important;
}

.aim-checkout-share-title::before {
    content: '🎨';
    font-size: 24px;
}

.aim-checkout-share-description {
    font-size: 15px;
    color: #5a6c7d;
    /* Ensure the subtitle block itself is horizontally centered on all pages */
    margin: 0 auto 20px auto !important;
    line-height: 1.6;
    max-width: 500px;
    text-align: center !important;
    display: block;
}

.aim-checkout-share-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.aim-checkout-share-button:hover {
    background: linear-gradient(135deg, #5a6ed8, #673f91);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.aim-checkout-share-button:active {
    transform: translateY(0);
}

.aim-checkout-share-button::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.aim-checkout-share-button:hover::after {
    transform: translateX(3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .aim-checkout-share-section {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .aim-checkout-share-title {
        font-size: 18px;
    }
    
    .aim-checkout-share-description {
        font-size: 14px;
    }
    
    .aim-checkout-share-button {
        font-size: 15px;
        padding: 10px 20px;
    }
}

/* Accessibility improvements */
.aim-checkout-share-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.aim-checkout-share-section[aria-hidden="true"] {
    display: none;
}
