/**
 * Persian Appointment Booking - Frontend Styles
 * Original functionality with target page styling
 */

 :root{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Yekan', sans-serif;
 }

.custom-contact-page {
    background-color: #C2EFB3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Add wrapper for responsive layout */
.page-content-wrapper {
    width: 100%;
    max-width: 1040px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Default layout for all screens */
.glass-container,
.plan-card {
    width: 100%;
    max-width: 500px;
    margin: 0 0 20px 0;
}

.plan-card {
    padding: 24px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    border: 1px solid #fff;
    box-sizing: border-box;
    position: relative;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
}

/* Laptop and larger screens with sufficient height */
@media screen and (min-width: 1200px) and (min-height: 800px) {
    .page-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 30px;
        padding: 0;
    }

    .glass-container,
    .plan-card {
        width: calc(50% - 15px);
        margin: 0;
    }

    .plan-card {
        position: sticky;
        top: 40px;
    }
}

/* Tablet and smaller laptops */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .page-content-wrapper {
        padding: 0;
    }

    .glass-container,
    .plan-card {
        max-width: 600px;
    }
}

/* Mobile devices */
@media screen and (max-width: 767px) {
    .page-content-wrapper {
        padding: 0;
    }

    .glass-container,
    .plan-card {
        margin: 0;
    }

    .plan-card {
        padding: 20px;
    }
}

/* Adjust plan card content spacing */
.plan-card .icon-container {
    margin-bottom: 10px;
}

.plan-card .plan-name {
    margin: 10px 0;
}

.plan-card .price-container {
    margin-top: 10px;
}

.plan-card .divider {
    margin: 10px 0;
}

.glass-container {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 16px 0 rgba(31, 38, 135, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    margin: 0;
    position: relative;
    transform: translateY(0);
}

.title-text{
    font-family: 'Yekan', sans-serif !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    color: #009A6E !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    direction: rtl !important;
}

.pab-step h4 {
    color: #333 !important;
    margin-bottom: 20px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-align: center !important;
    direction: rtl !important;
    font-family: 'Yekan', sans-serif !important;
}

/* Title styling */
.pab-booking-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 700;
    /* font-family: 'Yekan', sans-serif; */
    font-family: inherit;
    direction: rtl;
}

/* Form Steps */
.pab-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.pab-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Removed duplicate rule - using the one with !important above */

/* Form Grid */
.pab-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.pab-form-group-full {
    grid-column: 1 / -1;
}

.pab-form-group label {
    display: block;
    /* margin-bottom: 8px; */
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    direction: rtl;
}

.pab-form-group input,
.pab-form-group textarea {
    padding-right: 18px;
    padding-left: 18px;
    /* padding-top: 24px; */
    /* padding-bottom: 24px; */
    height: 56px !important;
    min-height: 56px !important;
    width: 100%;
    background-color: white !important;
    border: 1.5px solid rgb(222, 222, 222) !important;
    border-radius: 15px !important;
    font-size: 16px;
    font-family: inherit;
    /* margin-bottom: 20px; */
    direction: rtl;
    outline: none;
    transition: border-color 0.3s ease;
    align-items: start;
    text-align: start;
    box-sizing: border-box;
    display: block;
}

.pab-form-group textarea {
    min-height: 120px;
    line-height: 1.6;
    resize: vertical;
    text-align: right;
}

#pab-health-problem {
    height: 120px !important;
    min-height: 120px !important;
}

.pab-form-group input:focus,
.pab-form-group textarea:focus {
    border-color: #009A6E !important;
    border: 2px solid #009A6E !important;
    box-shadow: 0 0 0 1px #009A6E;
}

.pab-form-group input::placeholder,
.pab-form-group textarea::placeholder {
    color: #999;
    direction: rtl;
    font-family: inherit;
}

/* Persian Calendar */
.pab-persian-calendar {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pab-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.pab-calendar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #009A6E;
    margin: 0;
    font-family: 'Yekan', sans-serif;
}

.pab-calendar-nav {
    background-color: #009A6E;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pab-calendar-nav:hover {
    background-color: #007A54;
}

.pab-calendar-grid {
    width: 100%;
}

.pab-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.pab-weekday {
    background-color: #009A6E;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
}

.pab-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.pab-calendar-error {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.pab-calendar-day {
    aspect-ratio: 1;
    border: 1px solid rgba(0, 154, 110, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    position: relative;
    font-size: 0.95rem;
}

.pab-calendar-day:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: #009A6E;
}

.pab-calendar-day.available {
    color: #009A6E;
    border-color: rgba(0, 154, 110, 0.3);
}

.pab-calendar-day.selected {
    background-color: #009A6E;
    color: white;
    border-color: #007A54;
}

.pab-calendar-day.disabled {
    color: rgba(44, 62, 80, 0.3);
    cursor: not-allowed;
    background: rgba(245, 245, 245, 0.3);
}

.pab-calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

/* Time Grid */
.pab-time-grid {
    margin-bottom: 20px;
}

.pab-time-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.pab-time-option {
    cursor: pointer;
}

.pab-time-option input[type="radio"] {
    display: none;
}

.pab-time-card {
    border: 1.5px solid rgb(222, 222, 222);
    border-radius: 15px;
    padding: 18px 12px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 16px;
}

.pab-time-option:hover .pab-time-card {
    border-color: #009A6E;
}

.pab-time-option input[type="radio"]:checked + .pab-time-card {
    border-color: #009A6E;
    background: #009A6E;
    color: white;
}

/* Loading State */
.pab-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Buttons */
.pab-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.pab-btn {
    background-color: #009A6E;
    color: white;
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: inherit;
    font-weight: 600;
}

.pab-btn:hover:not(:disabled) {
    background-color: #007A54;
}

.pab-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.pab-btn-secondary {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid rgba(0, 154, 110, 0.3);
}

.pab-btn-secondary:hover:not(:disabled) {
    background-color: white;
}

/* Success Message */
.pab-success-message {
    text-align: center;
    padding: 40px 20px;
}

.pab-success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #009A6E;
    color: white;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: successPulse 0.6s ease-out;
}

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

.pab-success-message h4 {
    color: #009A6E;
    margin-bottom: 20px;
    font-size: 20px;
}

.pab-final-message {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 154, 110, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.pab-final-message p {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.pab-final-message strong {
    color: #009A6E;
}

/* Progress Indicator */
.pab-progress {
    display: flex;
    justify-content: space-between;
    margin: 30px 0 0 0;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pab-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.pab-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.pab-progress-step.active::after,
.pab-progress-step.completed::after {
    background-color: #009A6E;
}

.pab-progress-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pab-progress-step.active .pab-progress-number,
.pab-progress-step.completed .pab-progress-number {
    background: #009A6E;
    color: white;
}

.pab-progress-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.pab-progress-step.active .pab-progress-label {
    color: #009A6E;
    font-weight: 600;
}

/* reCAPTCHA Container */
.pab-recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pab-recaptcha-container .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
}

/* Plan card styles */
.icon-container {
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.plan-icon {
    width: 50px;
    height: 50px;
}

.price-container {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin-bottom: 0.5rem;
    text-align: right;
}

.plan-price {
    font-family: "Yekan";
    font-weight: 800;
    font-size: 40px;
    color: #009A6E;
    margin: 0;
}

.currency {
    font-family: "Yekan";
    font-weight: 600;
    font-size: 20px;
    color: #009A6E;
    margin-right: 0.25rem;
    margin-left: auto;
}

.plan-name {
    font-family: "Yekan";
    font-weight: bold;
    font-size: 24px;
    color: #009A6E;
    margin-bottom: 15px;
    text-align: right;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin-right: auto;
    margin-left: auto;
    margin-top: 5px;
    margin-bottom: 15px;
}

.promo-badge {
    display: inline-block;
    background-color: #FF9900;
    color: white;
    font-family: "Yekan";
    font-size: 0.9em;
    padding: 0.2em 0.6em;
    border-radius: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-contact-page {
        padding: 0;
    }
    
    .glass-container {
        padding: 30px 25px;
        margin: 0;
    }
    
    .pab-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pab-progress {
        padding: 15px 20px;
        margin-top: 20px;
    }
    
    .pab-progress-step {
        font-size: 12px;
    }
    
    .pab-progress-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .pab-time-options {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .pab-step-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .pab-calendar-weekdays, .pab-calendar-days {
        gap: 2px;
    }
    
    .pab-weekday {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
}