/**
 * Appointment Doctor Confirmation Page Styles
 * Template: appointment-doctor.php
 * SafeSante - Telemedicine Platform
 * Clean, professional medical appointment confirmation
 */

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

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

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

.overlay-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Calendar Wrapper */
.calendar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulse Rings */
.pulse-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring-1 {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.pulse-ring-2 {
    width: 140px;
    height: 140px;
    animation-delay: 0.4s;
}

.pulse-ring-3 {
    width: 180px;
    height: 180px;
    animation-delay: 0.8s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Calendar Icon */
.calendar-icon {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.calendar-svg {
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.5);
    animation: calendarAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

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

/* Calendar SVG Parts */
.cal-body {
    fill: #ffffff;
    opacity: 0.95;
}

.cal-header {
    fill: #FF6B5B;
}

.cal-ring {
    fill: #202B6D;
}

.cal-check {
    stroke: #10B981;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: checkDraw 0.5s ease forwards;
    animation-delay: 1s;
}

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

/* Calendar Glow */
.calendar-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 107, 91, 0.4) 0%, rgba(255, 107, 91, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: glowAppear 0.6s ease forwards;
    animation-delay: 0.8s;
    z-index: -1;
}

@keyframes glowAppear {
    to {
        opacity: 1;
    }
}

/* Overlay Text */
.overlay-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 35px;
    opacity: 0;
    transform: translateY(20px);
    animation: textSlideUp 0.6s ease forwards;
    animation-delay: 1.3s;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

/* Overlay Floating Particles */
.overlay-content::before,
.overlay-content::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 3s ease-in-out infinite;
}

.overlay-content::before {
    top: -70px;
    left: 90px;
    animation-delay: 0.5s;
}

.overlay-content::after {
    top: 40px;
    right: -90px;
    animation-delay: 1s;
}

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

/* Overlay Responsive */
@media (max-width: 768px) {
    .calendar-wrapper {
        width: 120px;
        height: 120px;
    }

    .calendar-icon {
        width: 75px;
        height: 75px;
    }

    .calendar-glow {
        width: 100px;
        height: 100px;
    }

    .pulse-ring-1 { width: 80px; height: 80px; }
    .pulse-ring-2 { width: 110px; height: 110px; }
    .pulse-ring-3 { width: 140px; height: 140px; }

    .overlay-text {
        font-size: 1.5rem;
        margin-top: 28px;
    }

    .overlay-content::before {
        top: -50px;
        left: 60px;
    }

    .overlay-content::after {
        top: 30px;
        right: -60px;
    }
}

@media (max-width: 480px) {
    .calendar-wrapper {
        width: 100px;
        height: 100px;
    }

    .calendar-icon {
        width: 65px;
        height: 65px;
    }

    .calendar-glow {
        width: 85px;
        height: 85px;
    }

    .pulse-ring-1 { width: 70px; height: 70px; }
    .pulse-ring-2 { width: 95px; height: 95px; }
    .pulse-ring-3 { width: 120px; height: 120px; }

    .overlay-text {
        font-size: 1.3rem;
        margin-top: 22px;
    }

    .overlay-content::before,
    .overlay-content::after {
        display: none;
    }
}

/* ==========================================================================
   1. Page Layout
   ========================================================================== */
.appointment-doctor-main {
    min-height: calc(100vh - 120px);
    background: linear-gradient(180deg, #202B6D 0%, #1a2352 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

/* Page content hidden initially */
.appointment-doctor-page .ad-page-header,
.appointment-doctor-page .appointment-doctor-main {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.appointment-doctor-page.content-visible .ad-page-header,
.appointment-doctor-page.content-visible .appointment-doctor-main {
    opacity: 1;
}

/* Pause animations initially */
.appointment-doctor-page .success-icon-wrapper,
.appointment-doctor-page .success-circle,
.appointment-doctor-page .success-glow,
.appointment-doctor-page .success-title,
.appointment-doctor-page .success-subtitle,
.appointment-doctor-page .action-buttons,
.appointment-doctor-page .med-icon,
.appointment-doctor-page .gradient-ring,
.appointment-doctor-page .subtle-pulse {
    animation-play-state: paused;
}

/* Play animations when visible */
.appointment-doctor-page.content-visible .success-icon-wrapper,
.appointment-doctor-page.content-visible .success-circle,
.appointment-doctor-page.content-visible .success-glow,
.appointment-doctor-page.content-visible .success-title,
.appointment-doctor-page.content-visible .success-subtitle,
.appointment-doctor-page.content-visible .action-buttons,
.appointment-doctor-page.content-visible .med-icon,
.appointment-doctor-page.content-visible .gradient-ring,
.appointment-doctor-page.content-visible .subtle-pulse {
    animation-play-state: running;
}

/* ==========================================================================
   2. Floating Medical Icons Background
   ========================================================================== */
.floating-medical {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.med-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: medIconFloat 6s ease-in-out infinite;
}

.med-icon i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.08);
}

.med-icon-1 {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.med-icon-2 {
    top: 25%;
    right: 12%;
    animation-delay: 1s;
}

.med-icon-3 {
    top: 55%;
    left: 5%;
    animation-delay: 2s;
}

.med-icon-4 {
    top: 70%;
    right: 8%;
    animation-delay: 0.5s;
}

.med-icon-5 {
    bottom: 20%;
    left: 15%;
    animation-delay: 1.5s;
}

.med-icon-6 {
    top: 40%;
    right: 5%;
    animation-delay: 2.5s;
}

@keyframes medIconFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1.1);
    }
    80% {
        opacity: 1;
    }
}

/* ==========================================================================
   3. Main Container
   ========================================================================== */
.appointment-container {
    max-width: 700px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   4. Success Icon
   ========================================================================== */
.success-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: iconWrapperAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes iconWrapperAppear {
    to {
        opacity: 1;
    }
}

.success-circle {
    width: 100px;
    height: 100px;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: scale(0);
}

@keyframes circleBounceIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 25px rgba(16, 185, 129, 0.4));
}

.success-circle-bg {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
    fill: rgba(16, 185, 129, 0.15);
}

.success-check {
    stroke: #10B981;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: checkStroke 0.5s ease forwards;
    animation-delay: 0.8s;
}

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

.success-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: glowPulse 2s ease-in-out infinite;
    animation-delay: 1s;
    z-index: -1;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ==========================================================================
   4b. Rotating Gradient Ring (Professional)
   ========================================================================== */
.gradient-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(16, 185, 129, 0.4) 60deg,
        rgba(16, 185, 129, 0.1) 120deg,
        transparent 180deg,
        rgba(16, 185, 129, 0.2) 240deg,
        transparent 360deg
    );
    opacity: 0;
    animation: gradientRingAppear 0.8s ease forwards, gradientRingRotate 12s linear infinite;
    animation-delay: 0.5s, 1.3s;
    z-index: 1;
}

.gradient-ring::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: linear-gradient(180deg, #202B6D 0%, #1a2352 100%);
    border-radius: 50%;
}

@keyframes gradientRingAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradientRingRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   4c. Subtle Pulse Ring (Professional)
   ========================================================================== */
.subtle-pulse {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    opacity: 0;
    animation: subtlePulseRing 4s ease-out infinite;
    animation-delay: 1.5s;
    z-index: 0;
}

@keyframes subtlePulseRing {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ==========================================================================
   4d. Success Circle Animation (Professional)
   ========================================================================== */
.success-circle {
    animation: circleBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

/* ==========================================================================
   5. Success Message
   ========================================================================== */
.success-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: titleSlideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.success-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(20px);
    animation: subtitleSlideUp 0.7s ease forwards;
    animation-delay: 0.8s;
}

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

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

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

.btn-primary-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 50px;
    background: linear-gradient(135deg, #FF6B5B 0%, #FF8F7D 100%);
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 35px rgba(255, 107, 91, 0.35);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect */
.btn-primary-home::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-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 91, 0.5);
    color: #ffffff;
    background: linear-gradient(135deg, #FF5A48 0%, #FF7D6A 100%);
}

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

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

/* ==========================================================================
   7. Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    .success-title {
        font-size: 2.5rem;
    }

    .success-subtitle {
        font-size: 1.15rem;
        margin-bottom: 45px;
    }

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

    .success-glow {
        width: 125px;
        height: 125px;
    }

    .gradient-ring {
        width: 115px;
        height: 115px;
    }

    .subtle-pulse {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 768px) {
    .appointment-doctor-main {
        padding: 50px 16px;
        min-height: calc(100vh - 100px);
    }

    .success-title {
        font-size: 2rem;
    }

    .success-subtitle {
        font-size: 1.05rem;
        margin-bottom: 40px;
    }

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

    .success-glow {
        width: 110px;
        height: 110px;
    }

    .success-icon-wrapper {
        margin-bottom: 35px;
    }

    .btn-primary-home {
        padding: 16px 40px;
        font-size: 1rem;
    }

    /* Professional effects adjustments */
    .gradient-ring {
        width: 105px;
        height: 105px;
    }

    .subtle-pulse {
        width: 80px;
        height: 80px;
    }

    /* Hide some medical icons */
    .med-icon-3,
    .med-icon-4 {
        display: none;
    }
}

@media (max-width: 480px) {
    .appointment-doctor-main {
        padding: 40px 12px;
    }

    .success-title {
        font-size: 1.75rem;
    }

    .success-subtitle {
        font-size: 0.95rem;
        margin-bottom: 35px;
        padding: 0 10px;
    }

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

    .success-glow {
        width: 95px;
        height: 95px;
    }

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

    .btn-primary-home {
        padding: 15px 35px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
    }

    /* Professional effects adjustments for mobile */
    .gradient-ring {
        width: 95px;
        height: 95px;
    }

    .gradient-ring::before {
        top: 2px;
        left: 2px;
        right: 2px;
        bottom: 2px;
    }

    .subtle-pulse {
        width: 70px;
        height: 70px;
    }

    /* Hide more medical icons on mobile */
    .med-icon-5,
    .med-icon-6 {
        display: none;
    }

    /* Simpler button animation */
    .btn-primary-home::before {
        display: none;
    }
}
