/* Period Tracker WordPress Plugin Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    animation: modalOverlayFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fef7ed 100%);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    max-width: 95%;
    max-height: 95%;
    width: 800px;
    height: 650px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalContentSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes modalContentSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(50px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    background: linear-gradient(135deg, #ec4899 0%, #f97316 50%, #8b5cf6 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none"><defs><pattern id="header-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23header-pattern)" /></svg>') repeat;
    opacity: 0.3;
}

.modal-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-header h2::before {
    content: '🌸';
    font-size: 28px;
    animation: headerIcon 3s ease-in-out infinite;
}

@keyframes headerIcon {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

.modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px;
    border-radius: 12px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

.modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    position: relative;
    background: white;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: white;
}

/* Button Styles */
.period-tracker-button-wp {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 32px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.period-tracker-button-wp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.period-tracker-button-wp:hover::before {
    left: 100%;
}

/* Button Sizes */
.period-tracker-button-wp.size-small {
    padding: 12px 20px;
    font-size: 14px;
    gap: 8px;
}

.period-tracker-button-wp.size-medium {
    padding: 16px 28px;
    font-size: 16px;
    gap: 12px;
}

.period-tracker-button-wp.size-large {
    padding: 20px 36px;
    font-size: 18px;
    gap: 16px;
}

/* Button Styles - Primary */
.period-tracker-button-wp.style-primary {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 50%, #8b5cf6 100%);
    color: white;
}

.period-tracker-button-wp.style-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.4);
    background: linear-gradient(135deg, #db2777 0%, #ea580c 50%, #7c3aed 100%);
}

/* Button Styles - Secondary */
.period-tracker-button-wp.style-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.period-tracker-button-wp.style-secondary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(100, 116, 139, 0.4);
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

/* Button Styles - Success */
.period-tracker-button-wp.style-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.period-tracker-button-wp.style-success:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Button Styles - Outline */
.period-tracker-button-wp.style-outline {
    background: transparent;
    border: 3px solid #ec4899;
    color: #ec4899;
    backdrop-filter: blur(10px);
}

.period-tracker-button-wp.style-outline:hover {
    background: #ec4899;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.3);
}

.button-icon {
    font-size: 22px;
    animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.1); }
}

.button-text {
    letter-spacing: 0.8px;
    position: relative;
}

/* Card Styles */
.period-tracker-card-wp {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 420px;
    position: relative;
    border: 1px solid #fce7f3;
    transform-style: preserve-3d;
}

.period-tracker-card-wp:hover {
    transform: translateY(-12px) rotateX(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border-color: #ec4899;
}

.card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.period-tracker-card-wp:hover .card-image img {
    transform: scale(1.08);
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.period-tracker-card-wp:hover .card-image::after {
    opacity: 1;
}

.card-content {
    padding: 28px;
    background: white;
    position: relative;
}

.card-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.3;
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-description {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
}

.card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 15px;
    color: #374151;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.card-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ec4899;
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-arrow {
    transition: transform 0.3s ease;
    font-size: 20px;
    font-weight: 900;
}

.period-tracker-card-wp:hover .button-arrow {
    transform: translateX(6px);
}

/* Widget Styles */
.period-tracker-widget-wp {
    background: white;
    border: 1px solid #fce7f3;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.widget-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.widget-expand {
    background: #fef7ed;
    border: none;
    color: #ea580c;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.widget-expand:hover {
    background: #fed7aa;
    color: #c2410c;
}

.widget-content {
    color: #374151;
}

.widget-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.stat-value.phase-menstrual { color: #dc2626; }
.stat-value.phase-follicular { color: #ea580c; }
.stat-value.phase-ovulation { color: #7c3aed; }
.stat-value.phase-luteal { color: #059669; }

.widget-login-prompt {
    text-align: center;
}

.widget-login-prompt p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #6b7280;
}

.widget-cta {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.3);
}

/* Theme Variations */
.theme-modern .modal-header {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 50%, #8b5cf6 100%);
}

.theme-wellness .modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
}

.theme-medical .modal-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #6366f1 100%);
}

.theme-minimal .modal-header {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }

    .modal-header {
        padding: 24px 28px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .modal-close {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .period-tracker-button-wp {
        padding: 16px 28px;
        font-size: 16px;
        gap: 12px;
    }

    .period-tracker-button-wp.size-small {
        padding: 12px 20px;
        font-size: 13px;
    }

    .period-tracker-button-wp.size-large {
        padding: 18px 32px;
        font-size: 17px;
    }

    .button-icon {
        font-size: 20px;
    }

    .period-tracker-card-wp {
        max-width: 100%;
        transform: none;
    }

    .period-tracker-card-wp:hover {
        transform: translateY(-8px);
    }

    .card-content {
        padding: 24px;
    }

    .card-title {
        font-size: 22px;
    }

    .card-description {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
    }

    .modal-header {
        padding: 20px 24px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .period-tracker-button-wp {
        padding: 14px 24px;
        font-size: 15px;
    }

    .card-image {
        height: 180px;
    }

    .card-content {
        padding: 20px;
    }

    .card-title {
        font-size: 20px;
    }

    .card-features li {
        font-size: 14px;
    }
}

/* Accessibility Improvements */
.modal-overlay[aria-hidden="true"] {
    display: none !important;
}

.period-tracker-button-wp:focus,
.modal-close:focus {
    outline: 3px solid #ec4899;
    outline-offset: 3px;
}

.period-tracker-card-wp:focus {
    outline: 3px solid #ec4899;
    outline-offset: 4px;
}

/* Loading state for embedded iframe */
.period-tracker-wp-container {
    position: relative;
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    border: 1px solid #fed7aa;
}

.period-tracker-wp-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.period-tracker-wp-container.loaded::before {
    opacity: 0;
    pointer-events: none;
}

/* Notification styles */
.period-wp-notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.period-health-tips-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}