/**
 * Appointment Partner Page - Simplified Professional Style
 * SafeSante - Telemedicine Platform
 * Navy Blue Theme with Coral Accent - Clean and Simple Design
 */

/* ============================================
   CSS Variables
============================================ */
:root {
    --ap-navy: #202B6D;
    --ap-navy-light: #2F4ACD;
    --ap-coral: #FF6B5B;
    --ap-coral-hover: #E85A4A;
    --ap-white: #ffffff;
    --ap-sky: #A7DBEE;
    --ap-gold: #FEC400;
}

/* ============================================
   Base Styles
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.appointment-partner-page {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(180deg, #202B6D 0%, #1a2352 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ap-white);
}

/* ============================================
   Success Overlay - 2 People Icon
============================================ */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #202B6D 0%, #2F4ACD 50%, #1a2352 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.success-overlay.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.success-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
}

/* People Icon Wrapper */
.people-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 30px;
}

/* Pulse Rings */
.pulse-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
}

.pulse-ring-1 {
    width: 100%;
    height: 100%;
    animation: pulseExpand 2s ease-out infinite;
    animation-delay: 0s;
}

.pulse-ring-2 {
    width: 100%;
    height: 100%;
    animation: pulseExpand 2s ease-out infinite;
    animation-delay: 0.5s;
}

.pulse-ring-3 {
    width: 100%;
    height: 100%;
    animation: pulseExpand 2s ease-out infinite;
    animation-delay: 1s;
}

@keyframes pulseExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* People Circle */
.people-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: circleAppear 0.6s ease forwards;
}

@keyframes circleAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.people-svg {
    width: 70px;
    height: 70px;
}

.people-circle-bg {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
}

/* Person 1 - Left */
.person-1-head {
    stroke: var(--ap-coral);
    stroke-width: 2;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: headDraw 0.4s ease forwards;
    animation-delay: 0.6s;
}

.person-1-body {
    stroke: var(--ap-coral);
    stroke-width: 2;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: bodyDraw 0.5s ease forwards;
    animation-delay: 0.8s;
}

/* Person 2 - Right */
.person-2-head {
    stroke: var(--ap-sky);
    stroke-width: 2;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: headDraw 0.4s ease forwards;
    animation-delay: 0.7s;
}

.person-2-body {
    stroke: var(--ap-sky);
    stroke-width: 2;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: bodyDraw 0.5s ease forwards;
    animation-delay: 0.9s;
}

@keyframes headDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes bodyDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Overlay Text */
.overlay-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--ap-white);
    opacity: 0;
    transform: translateY(20px);
    animation: textFadeIn 0.6s ease forwards;
    animation-delay: 1.2s;
}

@keyframes textFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Header Styles (Same as Competitor)
============================================ */
.ac-page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 40px;
    z-index: 1000;
    background: rgba(32, 43, 109, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

body.content-visible .ac-page-header {
    opacity: 1;
    transform: translateY(0);
}

.ac-header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ac-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.ac-logo img {
    height: 40px;
    width: auto;
}

.ac-header-buttons {
    display: flex;
    gap: 30px;
}

.ac-btn-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ac-btn-link:hover {
    color: #A7DBEE;
}

.ac-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .ac-page-header {
        padding: 15px 20px;
    }

    .ac-logo img {
        height: 32px;
    }

    .ac-mobile-toggle {
        display: block;
    }

    .ac-header-buttons {
        display: none;
    }

    .ac-header-buttons.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(32, 43, 109, 0.98);
        padding: 20px;
        gap: 15px;
        text-align: center;
    }
}

/* ============================================
   Main Content
============================================ */
.appointment-partner-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

/* ============================================
   Simple Floating Dots Background
============================================ */
.floating-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 107, 91, 0.3);
    opacity: 0;
}

body.content-visible .dot {
    animation: dotFloat 10s ease-in-out infinite;
}

/* Dot variations */
.dot-1 { width: 8px; height: 8px; top: 10%; left: 5%; animation-delay: 0s; }
.dot-2 { width: 12px; height: 12px; top: 20%; left: 15%; animation-delay: 0.5s; background: rgba(167, 219, 238, 0.3); }
.dot-3 { width: 6px; height: 6px; top: 15%; left: 85%; animation-delay: 1s; }
.dot-4 { width: 10px; height: 10px; top: 30%; left: 90%; animation-delay: 1.5s; background: rgba(167, 219, 238, 0.3); }
.dot-5 { width: 8px; height: 8px; top: 40%; left: 8%; animation-delay: 2s; }
.dot-6 { width: 14px; height: 14px; top: 50%; left: 3%; animation-delay: 2.5s; background: rgba(254, 196, 0, 0.2); }
.dot-7 { width: 6px; height: 6px; top: 55%; left: 95%; animation-delay: 3s; }
.dot-8 { width: 10px; height: 10px; top: 65%; left: 88%; animation-delay: 3.5s; background: rgba(167, 219, 238, 0.3); }
.dot-9 { width: 8px; height: 8px; top: 70%; left: 10%; animation-delay: 4s; }
.dot-10 { width: 12px; height: 12px; top: 80%; left: 5%; animation-delay: 4.5s; background: rgba(254, 196, 0, 0.2); }
.dot-11 { width: 6px; height: 6px; top: 75%; left: 92%; animation-delay: 5s; }
.dot-12 { width: 10px; height: 10px; top: 85%; left: 80%; animation-delay: 5.5s; background: rgba(167, 219, 238, 0.3); }
.dot-13 { width: 8px; height: 8px; top: 25%; left: 75%; animation-delay: 6s; }
.dot-14 { width: 6px; height: 6px; top: 45%; left: 70%; animation-delay: 6.5s; background: rgba(254, 196, 0, 0.2); }
.dot-15 { width: 10px; height: 10px; top: 90%; left: 15%; animation-delay: 7s; }

@keyframes dotFloat {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-20px) scale(1.2);
    }
}

/* ============================================
   Appointment Container
============================================ */
.appointment-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

body.content-visible .appointment-container {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Success Icon Wrapper - Handshake Image
============================================ */
.success-icon-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 40px;
    opacity: 0;
    animation: iconWrapperAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes iconWrapperAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Icon Pulse */
.icon-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
}

.icon-pulse-1 {
    width: 130px;
    height: 130px;
    animation: iconPulseExpand 3s ease-out infinite;
}

.icon-pulse-2 {
    width: 130px;
    height: 130px;
    animation: iconPulseExpand 3s ease-out infinite;
    animation-delay: 1.5s;
}

@keyframes iconPulseExpand {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* Success Circle */
.success-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
}

/* Handshake Icon Image */
.handshake-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0;
    transform: scale(0.5);
}

body.content-visible .handshake-icon {
    animation: iconAppear 0.6s ease forwards;
    animation-delay: 0.3s;
}

@keyframes iconAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Success Glow */
.success-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 107, 91, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* ============================================
   Typography
============================================ */
.success-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--ap-white);
    margin-bottom: 16px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: titleSlideUp 0.8s ease forwards;
    animation-delay: 0.3s;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@keyframes titleSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    animation: subtitleSlideUp 0.7s ease forwards;
    animation-delay: 0.5s;
}

@keyframes subtitleSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Action Button - Coral
============================================ */
.action-buttons {
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    animation: buttonSlideUp 0.7s ease forwards;
    animation-delay: 0.7s;
}

@keyframes buttonSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary-coral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 48px;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--ap-white);
    background: var(--ap-coral);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 91, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary-coral::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.5s ease;
}

.btn-primary-coral:hover {
    background: var(--ap-coral-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 91, 0.5);
}

.btn-primary-coral:hover::before {
    left: 100%;
}

.btn-primary-coral:active {
    transform: translateY(-1px);
}

/* ============================================
   Responsive Design
============================================ */
@media (max-width: 768px) {
    .appointment-partner-main {
        padding: 100px 20px 40px;
    }

    .success-icon-wrapper {
        width: 130px;
        height: 130px;
        margin-bottom: 30px;
    }

    .success-circle {
        width: 100px;
        height: 100px;
    }

    .success-svg {
        width: 65px;
        height: 65px;
    }

    .success-title {
        font-size: 32px;
    }

    .success-subtitle {
        font-size: 17px;
        padding: 0 10px;
    }

    .btn-primary-coral {
        padding: 16px 40px;
        font-size: 16px;
    }

    .people-wrapper {
        width: 120px;
        height: 120px;
    }

    .people-circle {
        width: 85px;
        height: 85px;
    }

    .people-svg {
        width: 60px;
        height: 60px;
    }

    .overlay-text {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .success-title {
        font-size: 26px;
    }

    .success-subtitle {
        font-size: 15px;
    }

    .btn-primary-coral {
        padding: 14px 35px;
        font-size: 15px;
    }
}

/* ============================================
   Hide content initially & Animation controls
============================================ */
body:not(.content-visible) .ap-page-header,
body:not(.content-visible) .appointment-container {
    opacity: 0;
}

/* Pause animations initially */
.appointment-partner-page .success-title,
.appointment-partner-page .success-subtitle,
.appointment-partner-page .action-buttons,
.appointment-partner-page .success-icon-wrapper,
.appointment-partner-page .success-circle,
.appointment-partner-page .handshake-icon,
.appointment-partner-page .success-glow,
.appointment-partner-page .icon-pulse,
.appointment-partner-page .dot {
    animation-play-state: paused;
}

/* Play animations when content is visible */
.appointment-partner-page.content-visible .success-title,
.appointment-partner-page.content-visible .success-subtitle,
.appointment-partner-page.content-visible .action-buttons,
.appointment-partner-page.content-visible .success-icon-wrapper,
.appointment-partner-page.content-visible .success-circle,
.appointment-partner-page.content-visible .handshake-icon,
.appointment-partner-page.content-visible .success-glow,
.appointment-partner-page.content-visible .icon-pulse,
.appointment-partner-page.content-visible .dot {
    animation-play-state: running;
}
