/* =========================================
   Event Calendar Styles (Plugin Version)
========================================= */
.ec-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
}

/* Step Indicator */
.ec-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 40px;
}

.ec-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.ec-step-icon {
    width: 32px;
    height: 32px;
    background-color: #cccccc;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.ec-step-label {
    font-size: 12px;
    color: #999;
}

.ec-step.active .ec-step-icon {
    background-color: #00608d;
}

.ec-step.active .ec-step-label {
    color: #666;
}

.ec-step-line {
    flex-grow: 1;
    height: 2px;
    background-color: #e0e0e0;
    margin-top: 15px;
    position: relative;
    z-index: 0;
}

/* Title */
.ec-title {
    text-align: center;
    font-size: 18px;
    font-weight: normal;
    color: #555;
    margin-bottom: 30px;
}

/* Instruction */
.ec-instruction {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.ec-badge {
    background-color: #b31b1b;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 10px;
}

.ec-instruction-text {
    font-size: 16px;
    font-weight: bold;
    color: #555;
}

/* Legend */
.ec-legend {
    text-align: center;
    margin-bottom: 20px;
}

.ec-legend-item {
    font-size: 13px;
    color: #555;
    margin: 0 10px;
    display: inline-flex;
    align-items: center;
}

.ec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    display: inline-block;
}

.ec-dot.web {
    background-color: #00608d;
}

.ec-dot.tel {
    background-color: #66a3c2;
}

/* Calendar Card */
.ec-calendar {
    background-color: #f2f2f2;
    padding: 20px;
    border-radius: 4px;
}

.ec-calendar-header h3 {
    text-align: center;
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
}

.ec-calendar-body {
    background: transparent;
}

.ec-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #fff;
    margin-bottom: 15px;
}

.ec-weekday {
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
    font-size: 14px;
}

.ec-sun {
    color: #d93b3b;
}

.ec-sat {
    color: #00608d;
}

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

.ec-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    text-decoration: none;
}

.ec-day.empty {
    /* empty cell */
}

.ec-day.disabled {
    color: #333;
}

.ec-day.disabled .ec-date {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ec-day.disabled .ec-status {
    font-size: 10px;
    color: #999;
}

.ec-day.available {
    background-color: #00608d;
    color: #fff;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ec-day.available:hover {
    background-color: #004c70;
}

.ec-day.available .ec-date {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 2px;
}

.ec-day.available .ec-status {
    font-size: 12px;
    font-weight: bold;
}

/* Modal */
.ec-modal-overlay {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ec-modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.ec-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 4px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.ec-modal-overlay.show .ec-modal-content {
    transform: translateY(0);
}

.ec-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.ec-modal-close:hover {
    color: #333;
}

.ec-modal-date-display {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 auto 20px auto;
    padding: 10px 20px;
    width: max-content;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.ec-time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 10px;
    margin-top: 20px;
}

.ec-time-btn {
    background-color: #00608d;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.ec-time-btn:hover {
    background-color: #004c70;
}

/* Screen 2 Styles */
.ec-selected-info {
    background-color: #eaeaea;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    color: #333;
}

.ec-info-row {
    margin-bottom: 5px;
}

.ec-form-instruction {
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
}

.ec-form-group {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 20px;
}

.ec-label-wrap {
    width: 30%;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.ec-label-wrap .ec-badge {
    margin-left: 10px;
}

.ec-req-text {
    color: #b31b1b;
    font-weight: bold;
    font-size: 13px;
    margin-left: 5px;
}

.ec-input-wrap {
    width: 70%;
}

.ec-input,
.ec-textarea {
    width: 100%;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    font-family: inherit;
}

.ec-textarea {
    height: 100px;
    resize: vertical;
}

.ec-zip-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ec-zip-wrap span {
    margin-right: 10px;
}

.ec-zip-input {
    width: 200px;
}

.ec-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ec-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 13px;
}

.ec-checkbox-grid label {
    display: flex;
    align-items: center;
}

.ec-checkbox-grid input {
    margin-right: 5px;
}

.ec-questionnaire-toggle {
    background-color: #a89968;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
}

.ec-toggle-icon {
    background-color: #fff;
    color: #a89968;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    border-radius: 2px;
}

.ec-privacy-box {
    background-color: #fcfaf5;
    border: 1px solid #e6dec1;
    padding: 20px;
    font-size: 13px;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
}

.ec-privacy-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.ec-privacy-check {
    margin-top: 15px;
    font-weight: bold;
}

.ec-privacy-check input {
    margin-right: 5px;
}

.ec-privacy-note {
    color: #b31b1b;
    font-size: 11px;
    margin-top: 5px;
    margin-left: 20px;
}

.ec-submit-wrap {
    text-align: center;
}

.ec-submit-btn {
    background-color: #333;
    color: #fff;
    padding: 15px 50px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.ec-radio-list,
.ec-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

.ec-radio-list label,
.ec-checkbox-list label {
    display: flex;
    align-items: flex-start;
}

.ec-radio-list input,
.ec-checkbox-list input {
    margin-right: 8px;
    margin-top: 3px;
}

.ec-short-input {
    width: 80px !important;
    display: inline-block;
    margin: 0 5px;
    text-align: right;
}

.ec-inline-group {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.ec-select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0 5px;
    font-family: inherit;
    font-size: 14px;
}

.ec-questionnaire-content {
    background-color: #fcfaf5;
    padding: 20px 0;
    border-top: 1px dotted #ccc;
}

.ec-questionnaire-content .ec-form-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Screen 3 */
.ec-warning-box {
    background-color: #fcebd1;
    color: #a86c2e;
    text-align: center;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 14px;
    border-radius: 4px;
}

.ec-warning-box strong {
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.ec-confirm-table {
    margin-bottom: 30px;
    border-top: 1px solid #e0e0e0;
}

.ec-confirm-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.ec-confirm-label {
    width: 30%;
    background-color: #00608d;
    color: #fff;
    padding: 15px;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.ec-confirm-value {
    width: 70%;
    padding: 15px 20px;
    background-color: #fff;
    color: #333;
    display: flex;
    align-items: center;
    min-height: 50px;
    font-size: 14px;
}

.ec-confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.ec-back-btn {
    background-color: #a0a0a0;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.ec-send-btn {
    background-color: #333;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* =========================================
   Responsive Adjustments (Media Queries)
========================================= */
@media screen and (max-width: 768px) {
    /* Main Layout */
    .ec-wrapper {
        padding: 0 10px;
    }

    /* Step Indicator */
    .ec-steps {
        padding: 0;
        margin-bottom: 25px;
    }
    .ec-step-label {
        font-size: 11px;
    }
    .ec-step-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Calendar */
    .ec-calendar {
        padding: 10px;
    }
    .ec-day {
        height: 45px;
    }
    .ec-weekday {
        font-size: 12px;
        padding: 5px 0;
    }

    /* Modal */
    .ec-modal-content {
        padding: 20px;
        width: 95%;
    }
    .ec-time-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ec-time-btn {
        padding: 10px;
    }

    /* Forms */
    .ec-form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .ec-label-wrap,
    .ec-input-wrap {
        width: 100% !important; /* overrides inline styles in shortcode */
    }
    .ec-label-wrap {
        margin-bottom: 10px;
    }
    
    .ec-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .ec-inline-group {
        flex-wrap: wrap;
    }
    
    .ec-zip-wrap {
        width: 100%;
    }
    .ec-zip-input {
        flex-grow: 1;
        width: auto;
    }

    /* Questionnaire Specific adjustments */
    .ec-questionnaire-toggle {
        font-size: 13px;
        padding: 12px 15px;
    }

    /* Confirmation Table */
    .ec-confirm-row {
        flex-direction: column;
    }
    .ec-confirm-label {
        width: 100%;
        padding: 10px;
    }
    .ec-confirm-value {
        width: 100%;
        padding: 10px;
        min-height: auto;
    }

    .ec-confirm-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }
    .ec-back-btn, .ec-send-btn {
        width: 100%;
    }
    
    .ec-selected-info {
        padding: 15px 10px;
        font-size: 14px;
    }
}