/* Arkadewi Calendar Styles */

:root {
    --arkadewi-primary: #95641a;
    --arkadewi-primary-dark: #6b4812;
    --arkadewi-accent: #d4af37;
    --arkadewi-sold: #e74c3c;
    --arkadewi-available: #27ae60;
    --arkadewi-border: #e0e0e0;
    --arkadewi-text: #333;
    --arkadewi-text-light: #666;
    --arkadewi-bg: #ffffff;
    --arkadewi-shadow: rgba(149, 100, 26, 0.1);
    --arkadewi-shadow-hover: rgba(149, 100, 26, 0.2);
}

.arkadewi-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Date Picker */
.arkadewi-date-picker {
    position: relative;
    max-width: 340px;
    margin: 0 auto 30px;
}

.arkadewi-date-input {
    width: 100%;
    padding: 14px 45px 14px 18px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid var(--arkadewi-border);
    border-radius: 8px;
    background: var(--arkadewi-bg);
    color: var(--arkadewi-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.arkadewi-date-input:hover,
.arkadewi-date-input:focus {
    border-color: var(--arkadewi-primary);
    box-shadow: 0 0 0 3px rgba(149, 100, 26, 0.1);
    outline: none;
}

.arkadewi-calendar-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--arkadewi-text-light);
    pointer-events: none;
}

/* Calendar Container */
.arkadewi-calendar-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.arkadewi-calendar-scroll {
    flex: 1;
    overflow: hidden;
}

.arkadewi-calendar-days {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.arkadewi-calendar-days::-webkit-scrollbar {
    display: none;
}

/* Navigation Buttons */
.arkadewi-nav-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid var(--arkadewi-border);
    border-radius: 50%;
    background: var(--arkadewi-bg);
    color: var(--arkadewi-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--arkadewi-shadow);
}

.arkadewi-nav-btn:hover {
    background: var(--arkadewi-primary);
    color: white;
    border-color: var(--arkadewi-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--arkadewi-shadow-hover);
}

.arkadewi-nav-btn:active {
    transform: scale(0.95);
}

.arkadewi-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Day Card */
.arkadewi-day-card {
    flex-shrink: 0;
    width: 120px;
    border: 2px solid var(--arkadewi-border);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    background: var(--arkadewi-bg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px var(--arkadewi-shadow);
}

.arkadewi-day-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--arkadewi-shadow-hover);
    border-color: var(--arkadewi-primary);
}

.arkadewi-day-card.selected {
    background: linear-gradient(135deg, var(--arkadewi-primary) 0%, var(--arkadewi-primary-dark) 100%);
    border-color: var(--arkadewi-primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(149, 100, 26, 0.3);
}

.arkadewi-day-card.in-range {
    background: linear-gradient(135deg, rgba(149, 100, 26, 0.1) 0%, rgba(149, 100, 26, 0.15) 100%);
    border-color: var(--arkadewi-primary);
}

.arkadewi-day-card.sold {
    opacity: 0.7;
    cursor: pointer;
    /* Changed from not-allowed to pointer */
}

.arkadewi-day-card.sold:hover {
    transform: translateY(-4px);
    /* Allow hover effect */
    box-shadow: 0 8px 20px var(--arkadewi-shadow-hover);
    border-color: var(--arkadewi-sold);
}

/* Day Content */
.arkadewi-day-name {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    color: var(--arkadewi-text-light);
}

.arkadewi-day-card.selected .arkadewi-day-name {
    color: rgba(255, 255, 255, 0.9);
}

.arkadewi-day-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--arkadewi-text);
}

.arkadewi-day-card.selected .arkadewi-day-number {
    color: white;
}

.arkadewi-day-month {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--arkadewi-text-light);
}

.arkadewi-day-card.selected .arkadewi-day-month {
    color: rgba(255, 255, 255, 0.9);
}

/* Status Badge */
.arkadewi-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.arkadewi-status-badge.sold {
    background: var(--arkadewi-sold);
    color: white;
}

.arkadewi-status-badge.available {
    background: transparent;
    color: var(--arkadewi-text);
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
}

.arkadewi-day-card.selected .arkadewi-status-badge.available {
    color: white;
}

/* Clear Selection Button */
.arkadewi-clear-selection {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    display: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.arkadewi-clear-selection.visible {
    display: block !important;
    opacity: 1;
}

.arkadewi-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--arkadewi-border);
    color: var(--arkadewi-text);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.arkadewi-clear-btn:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.arkadewi-clear-btn:active {
    transform: translateY(0);
}

.arkadewi-clear-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Selected Range */
.arkadewi-selected-range {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(149, 100, 26, 0.05) 0%, rgba(149, 100, 26, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid var(--arkadewi-primary);
}

.arkadewi-selected-range p {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--arkadewi-text);
}

.arkadewi-selected-range span {
    color: var(--arkadewi-primary);
    font-weight: 700;
}

/* Book Button */
.arkadewi-book-btn {
    background: linear-gradient(135deg, var(--arkadewi-primary) 0%, var(--arkadewi-primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(149, 100, 26, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.arkadewi-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 100, 26, 0.4);
}

.arkadewi-book-btn:active {
    transform: translateY(0);
}

/* Loading State */
.arkadewi-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--arkadewi-text-light);
    font-size: 15px;
}

/* Error Message */
.arkadewi-error {
    background: #fee;
    color: #c33;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .arkadewi-calendar-wrapper {
        padding: 15px;
    }

    .arkadewi-day-card {
        width: 100px;
        padding: 12px 8px;
    }

    .arkadewi-day-number {
        font-size: 24px;
    }

    .arkadewi-nav-btn {
        width: 38px;
        height: 38px;
    }

    .arkadewi-calendar-container {
        gap: 10px;
    }

    .arkadewi-calendar-days {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .arkadewi-day-card {
        width: 85px;
        padding: 10px 6px;
    }

    .arkadewi-day-number {
        font-size: 20px;
    }

    .arkadewi-day-name,
    .arkadewi-day-month {
        font-size: 11px;
    }

    .arkadewi-status-badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    .arkadewi-book-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Date Picker Modal */
.arkadewi-datepicker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.arkadewi-datepicker-modal.active {
    display: flex;
}

.arkadewi-datepicker-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.arkadewi-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--arkadewi-border);
}

.arkadewi-datepicker-month {
    font-size: 18px;
    font-weight: 700;
    color: var(--arkadewi-text);
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.arkadewi-datepicker-nav {
    background: transparent;
    border: none;
    color: var(--arkadewi-text);
    cursor: pointer;
    flex-shrink: 0;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arkadewi-datepicker-nav:hover {
    background: rgba(149, 100, 26, 0.1);
    color: var(--arkadewi-primary);
}

.arkadewi-datepicker-nav svg {
    width: 20px;
    height: 20px;
}

.arkadewi-datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.arkadewi-datepicker-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--arkadewi-text-light);
    padding: 8px 0;
}

.arkadewi-datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.arkadewi-datepicker-day {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--arkadewi-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arkadewi-datepicker-day:hover:not(.disabled):not(.other-month) {
    background: rgba(149, 100, 26, 0.1);
    border-color: var(--arkadewi-primary);
}

.arkadewi-datepicker-day.selected {
    background: var(--arkadewi-primary);
    color: white;
    border-color: var(--arkadewi-primary);
    font-weight: 700;
}

.arkadewi-datepicker-day.today {
    border-color: var(--arkadewi-primary);
    color: var(--arkadewi-primary);
    font-weight: 600;
}

.arkadewi-datepicker-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.4;
}

.arkadewi-datepicker-day.other-month {
    color: #ccc;
    opacity: 0.3;
}

.arkadewi-datepicker-close {
    width: 100%;
    margin-top: 20px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--arkadewi-border);
    color: var(--arkadewi-text);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.arkadewi-datepicker-close:hover {
    background: var(--arkadewi-primary);
    border-color: var(--arkadewi-primary);
    color: white;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.arkadewi-day-card {
    animation: slideIn 0.3s ease forwards;
}

.arkadewi-day-card:nth-child(1) {
    animation-delay: 0.05s;
}

.arkadewi-day-card:nth-child(2) {
    animation-delay: 0.1s;
}

.arkadewi-day-card:nth-child(3) {
    animation-delay: 0.15s;
}

.arkadewi-day-card:nth-child(4) {
    animation-delay: 0.2s;
}

.arkadewi-day-card:nth-child(5) {
    animation-delay: 0.25s;
}

.arkadewi-day-card:nth-child(6) {
    animation-delay: 0.3s;
}

.arkadewi-day-card:nth-child(7) {
    animation-delay: 0.35s;
}

/* Responsive untuk modal */
@media (max-width: 480px) {
    .arkadewi-datepicker-content {
        padding: 20px;
        max-width: 95%;
    }

    .arkadewi-datepicker-month {
        font-size: 16px;
    }

    .arkadewi-datepicker-day {
        font-size: 13px;
    }
}