/* ============================================
   ValtykCal Booking Widget Styles
   ============================================ */

.vcal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    width: 100%;
    min-height: 480px;
}

/* Layout */
.vcal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 480px;
}

@media (max-width: 768px) {
    .vcal-layout {
        grid-template-columns: 1fr;
    }
}

/* Calendar Side */
.vcal-calendar-side {
    padding: 24px;
    border-right: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .vcal-calendar-side {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 20px 16px;
    }
}

/* Month Navigation */
.vcal-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vcal-month-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.vcal-nav-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.vcal-nav-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #37919D;
}

/* Day Names */
.vcal-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}

.vcal-day-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Days Grid */
.vcal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.vcal-day {
    padding: 8px 4px;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.vcal-day--outside {
    color: #d1d5db;
    font-weight: 400;
}

.vcal-day--past {
    color: #d1d5db;
    cursor: default;
}

.vcal-day--today {
    font-weight: 700;
    color: #37919D;
}

.vcal-day--today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #37919D;
    border-radius: 50%;
}

.vcal-day--clickable {
    cursor: pointer;
}

.vcal-day--clickable:hover {
    background: rgba(55, 145, 157, 0.08);
    color: #37919D;
}

.vcal-day--selected {
    background: #37919D !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(55, 145, 157, 0.3);
}

.vcal-day--selected::after {
    display: none;
}

/* Slots Side */
.vcal-slots-side {
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 600px;
}

@media (max-width: 768px) {
    .vcal-slots-side {
        padding: 20px 16px;
        max-height: none;
    }
}

/* Empty State */
.vcal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    text-align: center;
    padding: 20px;
}

.vcal-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.vcal-empty-text {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 200px;
}

/* Slots Header */
.vcal-slots-header {
    margin-bottom: 16px;
}

.vcal-slots-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    text-transform: capitalize;
}

.vcal-slots-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

/* Slots Grid */
.vcal-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 6px;
    margin-bottom: 16px;
}

.vcal-slot {
    padding: 10px 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: center;
}

.vcal-slot:hover {
    border-color: #37919D;
    color: #37919D;
    background: rgba(55, 145, 157, 0.04);
}

.vcal-slot--selected {
    border-color: #37919D;
    border-width: 2px;
    background: rgba(55, 145, 157, 0.08);
    color: #37919D;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(55, 145, 157, 0.15);
}

/* Loading */
.vcal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.vcal-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: #37919D;
    animation: vcal-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes vcal-spin {
    to { transform: rotate(360deg); }
}

/* No Slots */
.vcal-no-slots {
    text-align: center;
    padding: 30px 20px;
    color: #92400E;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: 12px;
    font-size: 0.9rem;
}

.vcal-no-slots span {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.vcal-no-slots-hint {
    font-size: 0.8rem;
    color: #B45309;
    margin-top: 4px !important;
}

/* Booking Form */
.vcal-form {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    animation: vcal-slideUp 0.3s ease;
}

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

.vcal-form-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(55, 145, 157, 0.06);
    border: 1px solid rgba(55, 145, 157, 0.15);
    border-radius: 10px;
    margin-bottom: 16px;
}

.vcal-form-summary-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.vcal-form-summary strong {
    display: block;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.vcal-form-summary span {
    font-size: 0.8rem;
    color: #37919D;
    font-weight: 500;
}

.vcal-form-group {
    margin-bottom: 12px;
}

.vcal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 500px) {
    .vcal-form-row {
        grid-template-columns: 1fr;
    }
}

.vcal-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.vcal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.vcal-input:focus {
    border-color: #37919D;
    box-shadow: 0 0 0 3px rgba(55, 145, 157, 0.1);
}

.vcal-input::placeholder {
    color: #cbd5e1;
}

.vcal-textarea {
    resize: vertical;
    min-height: 50px;
}

/* Submit Button */
.vcal-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #37919D 0%, #2d7a84 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(55, 145, 157, 0.3);
    margin-top: 4px;
}

.vcal-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(55, 145, 157, 0.4);
}

.vcal-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.vcal-btn-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: vcal-spin 0.7s linear infinite;
    display: inline-block;
}

.vcal-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 10px 0 0;
}

/* Confirmation */
.vcal-confirmation {
    text-align: center;
    padding: 40px 30px;
    animation: vcal-fadeIn 0.5s ease;
}

@keyframes vcal-fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.vcal-confirm-icon {
    margin-bottom: 16px;
}

.vcal-confirm-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #065F46;
    margin: 0 0 6px;
}

.vcal-confirm-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 24px;
}

.vcal-confirm-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: left;
    max-width: 360px;
    margin: 0 auto 20px;
}

.vcal-confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.vcal-confirm-row:last-child {
    border-bottom: none;
}

.vcal-confirm-label {
    font-size: 0.85rem;
    color: #64748b;
}

.vcal-confirm-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.vcal-confirm-notice {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 10px;
    padding: 14px 18px;
    max-width: 360px;
    margin: 0 auto 24px;
}

.vcal-confirm-notice p {
    margin: 0;
    font-size: 0.82rem;
    color: #065F46;
    line-height: 1.5;
}

.vcal-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.vcal-confirm-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vcal-confirm-btn--primary {
    border: 1px solid #37919D;
    background: white;
    color: #37919D;
}

.vcal-confirm-btn--primary:hover {
    background: rgba(55, 145, 157, 0.06);
}

.vcal-confirm-btn--whatsapp {
    border: none;
    background: #25D366;
    color: white;
}

.vcal-confirm-btn--whatsapp:hover {
    background: #1fb855;
}
