/**
 * Upcoming Bookly Appointments Styles
 * Custom styling for the upcoming appointments shortcode
 */

/* Styling for Partner Appointments section */
.partner-appointments {
    font-family: 'Arial', sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.partner-appointments h2 {
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

/* Card Layout */
.appointment-card {
    background-color: #ffffff;
    border-radius: 0;
    margin-bottom: 20px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: end;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
}

.appointment-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Header section with circle and title */
.appointment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* Circle with duration */
.appointment-circle {
    width: 100px;
    height: 100px;
    min-width: 100px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
    border: 2px solid #e8e8e8;
    position: relative;
    box-shadow: 0 3px 10px rgba(197, 216, 109, 0.2);
    --progress: 0;
}

/* Dynamic progress circle background */
.appointment-circle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(
        from -90deg,
        #c5d86d 0deg,
        #c5d86d calc(var(--progress) * 3.6deg),
        transparent calc(var(--progress) * 3.6deg),
        transparent 360deg
    );
    z-index: 0;
    transform: rotate(90deg);
}

/* Inner circle to create border effect */
.appointment-circle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background-color: #ffffff;
    z-index: 1;
}

/* Ensure content is above the progress circle */
.appointment-circle .appointment-time {
    position: relative;
    z-index: 2;
}

.appointment-time {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.appointment-time .time {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-top: 8px;
}

.appointment-time .unit {
    font-size: 20px;
    color: #1A2921;
    text-transform: uppercase;
    margin-top: 0;
    font-family: 'DegularDisplay600';
    font-weight: 600;
}

/* Appointment info section */
.appointment-info {
    flex-grow: 1;
}

/* Title styling */
.appointment-info .appointment-title {
    font-family: 'DegularDisplay600' !important;
    font-weight: 600 !important;
    font-size: 36px;
    margin: 0 0 10px 0;
    color: #1A2921;
}

/* Staff name styling */
.appointment-info .appointment-staff {
    font-size: 20px;
    color: #61758A;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Time and date details */
.appointment-time-details,
.appointment-date {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #1A2921;
    margin-bottom: 10px;
}

.time-icon,
.date-icon {
    margin-right: 10px;
    color: #1A2921;
    display: flex;
    align-items: center;
}

.time-icon i,
.date-icon i {
    font-size: 18px;
}

/* Cancel button */
.appointment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-btn {
    background-color: #ffffff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background-color: #f8f8f8;
    border-color: #ccc;
}

/* Disabled cancel button styles */
.cancel-btn-disabled,
.cancel-btn:disabled {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.cancel-btn-disabled:hover,
.cancel-btn:disabled:hover {
    background-color: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
}

/* Loading state */
.appointment-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* No appointments message */
.no-appointments {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-appointments-icon {
    margin-bottom: 20px;
    width: 100%;
    max-width: 220px;
    height: auto;
}

.no-appointments-icon img {
    width: 100%;
    height: auto;
}

.no-appointments-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px;
}

.no-appointments-message {
    font-size: 16px;
    color: #666;
    margin: 0 0 25px;
    max-width: 400px;
    line-height: 1.5;
}

.no-appointments-actions {
    margin-top: 5px;
}

a.schedule-appointment-btn {
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

a.schedule-appointment-btn:hover {
    background-color: #e9e9e9;
}
.no-appointments-actions a {
    font-family: 'DegularDisplay600';
}
.appointment-actions button.cancel-btn.cdp-cancel-appointment {
    height: 50px !important;
    padding: 10px 30px;
    background: transparent;
    border-color: #CCCCCC;
}

.appointment-header .appointment-info {
    padding-left: 25px;
    border-left: 1px solid #CCCCCC;
}

/* Responsive styles */
@media (max-width: 768px) {
    .appointment-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .appointment-circle {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .appointment-info {
        width: 100%;
        text-align: center;
    }
    
    .appointment-time-details,
    .appointment-date {
        justify-content: center;
    }
    
    .appointment-actions {
        justify-content: center;
    }
}

/* RTL support */
.rtl .appointment-circle {
    margin-right: 0;
    margin-left: 30px;
}

.rtl .appointment-info {
    text-align: right;
}

.rtl .time-icon, 
.rtl .date-icon {
    margin-right: 0;
    margin-left: 10px;
}

/* Status-specific styles */
.appointment-card.cancelled,
.appointment-card.rejected {
    opacity: 0.7;
}

.appointment-card.pending .appointment-circle {
    border-color: #ffc107;
}

.appointment-card.approved .appointment-circle {
    border-color: #c5d86d;
}

.appointment-card.cancelled .appointment-circle {
    border-color: #dc3545;
}

/* ============================================
   Custom Cancel Appointment Modal Styles
   ============================================ */

.cdp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.cdp-modal-container {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cdpModalSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes cdpModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cdp-modal-header {
    padding: 24px 32px 20px 32px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    background: #f8fdf4;
}

.cdp-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1A2921;
    margin: 0;
    font-family: 'DegularDisplay600', Arial, sans-serif;
}

.cdp-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cdp-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.cdp-modal-body {
    padding: 32px;
    text-align: center;
}

.cdp-modal-message {
    font-size: 18px;
    color: #333;
    margin: 0 0 12px 0;
    font-weight: 500;
    line-height: 1.4;
}

.cdp-modal-warning {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.cdp-modal-footer {
    padding: 20px 32px 32px 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
    background: #f8fdf4;
}

.cdp-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
}

.cdp-btn-keep {
    background-color: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

.cdp-btn-keep:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px);
}

.cdp-btn-cancel {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.cdp-btn-cancel:hover {
    background-color: #bd2130 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
}

/* Prevent body scroll when modal is open */
body.cdp-modal-open {
    overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cdp-modal-container {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .cdp-modal-header,
    .cdp-modal-body,
    .cdp-modal-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .cdp-modal-footer {
        flex-direction: column;
    }
    
    .cdp-btn {
        width: 100%;
    }
}

/* RTL Support for Modal */
.rtl .cdp-modal-close {
    right: auto;
    left: 24px;
}

.rtl .cdp-modal-footer {
    flex-direction: row-reverse;
} 
body button.cdp-modal-close {
    line-height: 0;
    font-size: 24px;
}
body .cdp-modal-overlay {
    align-items: center;
}
body .cdp-modal-container {
    border-radius: 0 0 12px 12px;
}

/* Override Elementor styles for CDP modal buttons */
#cdp-cancel-appointment-modal button.cdp-btn-keep,
.elementor-kit-5 #cdp-cancel-appointment-modal button.cdp-btn-keep {
    background-color: #6c757d !important;
}

#cdp-cancel-appointment-modal button.cdp-btn-keep:hover,
.elementor-kit-5 #cdp-cancel-appointment-modal button.cdp-btn-keep:hover {
    background-color: #5a6268 !important;
}

#cdp-cancel-appointment-modal button.cdp-btn-cancel,
.elementor-kit-5 #cdp-cancel-appointment-modal button.cdp-btn-cancel {
    background-color: #dc3545 !important;
}

#cdp-cancel-appointment-modal button.cdp-btn-cancel:hover,
.elementor-kit-5 #cdp-cancel-appointment-modal button.cdp-btn-cancel:hover {
    background-color: #bd2130 !important;
}