/* ============================================
   Etkinlik Takvimi — Premium Calendar Styles
   ============================================ */

/* ─── Wrapper ─── */
.etk-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px 0;
}

/* ─── Widget Title ─── */
.etk-widget-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #1A237E;
    margin: 0 0 30px 0;
    letter-spacing: 0.5px;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* ─── Calendar Header (Month Nav + Date Filter) ─── */
.etk-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
}

.etk-header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.etk-month-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.etk-month-name {
    font-size: 42px;
    font-weight: 800;
    color: #283593;
    line-height: 1;
}

.etk-year {
    font-size: 28px;
    font-weight: 400;
    color: #7986CB;
    line-height: 1;
}

/* ─── Navigation Buttons ─── */
.etk-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: #3F51B5;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
    flex-shrink: 0;
}

.etk-nav-btn:hover {
    background-color: #283593;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.35);
}

.etk-nav-btn:active {
    transform: scale(0.95);
}

.etk-nav-btn svg {
    width: 12px;
    height: 12px;
}

/* ─── Date Filter (right side of header) ─── */
.etk-date-filter {
    position: absolute;
    right: 82px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.etk-date-select {
    height: 38px;
    padding: 0 28px 0 12px;
    border-radius: 20px;
    border: 1.5px solid #C5CAE9;
    background: #ffffff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%237986CB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    white-space: nowrap;
    box-sizing: border-box;
}

.etk-date-select:hover {
    border-color: #3F51B5;
    color: #3F51B5;
}

.etk-date-select:focus {
    outline: none;
    border-color: #3F51B5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

.etk-date-go {
    height: 38px;
    padding: 0 18px;
    border-radius: 20px;
    border: none;
    background: #3F51B5;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.etk-date-go:hover {
    background: #283593;
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.35);
}

.etk-date-go:active {
    transform: scale(0.95);
}

/* ─── Month Tabs Wrapper ─── */
.etk-month-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.etk-tabs-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #C5CAE9;
    background: #ffffff;
    color: #3F51B5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.etk-tabs-arrow:hover {
    background: #3F51B5;
    color: #ffffff;
    border-color: #3F51B5;
}

/* ─── Month Tabs (scrollable) ─── */
.etk-month-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    scroll-behavior: smooth;
    flex: 1;
    max-width: calc(9 * 110px + 8 * 8px);
}

.etk-month-tab {
    padding: 10px 22px;
    border-radius: 20px;
    border: 1.5px solid #C5CAE9;
    background: #ffffff;
    color: #333;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.etk-month-tab:hover {
    background: #E8EAF6;
    border-color: #3F51B5;
    color: #3F51B5;
}

.etk-month-tab-active {
    background: #3F51B5;
    color: #ffffff;
    border-color: #3F51B5;
    font-weight: 600;
}

.etk-month-tab-active:hover {
    background: #283593;
    border-color: #283593;
    color: #ffffff;
}

/* ─── Calendar Table ─── */
.etk-calendar-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #3F51B5;
    table-layout: fixed;
}

.etk-calendar-table thead th {
    background-color: #ffffff;
    color: #000000;
    font-weight: 800;
    font-size: 20px;
    padding: 16px 8px;
    text-align: center;
    border: 2px solid #3F51B5;
    letter-spacing: 0.5px;
}



/* ─── Empty Cell ─── */
.etk-empty {
    background-color: #FAFAFA;
}

/* ─── Day Number ─── */
.etk-day-number {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #3F51B5;
    line-height: 1.2;
}

/* ─── Weekend Days ─── */
.etk-weekend .etk-day-number {
    color: #E53935;
}

/* ─── Today Highlight ─── */
.etk-today {
    background-color: #E8EAF6;
}

.etk-today .etk-day-number {
    background-color: #3F51B5;
    color: #ffffff !important;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ─── Event Card (inline in cell) ─── */
.etk-event-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    margin-top: 4px;
    padding: 4px 5px;
    background: transparent;
    border-radius: 0;
    border: none;
    text-align: left;
    position: relative;
    min-height: 40px;
}

.etk-event-card + .etk-event-card {
    margin-top: 3px;
}

.etk-event-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.etk-event-title {
    font-size: 16px;
    font-weight: 700;
    color: #1A237E;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.etk-event-excerpt {
    font-size: 12px;
    font-weight: 400;
    color: #555;
    line-height: 1.4;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ─── Etkinliğe Git Link ─── */
.etk-event-goto {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #3F51B5;
    text-decoration: none !important;
    margin-top: 5px;
    transition: color 0.2s ease;
}

.etk-event-goto:hover {
    color: #283593;
    text-decoration: underline !important;
}

/* ─── Instagram Logo (sağ alt köşe) ─── */
.etk-event-ig {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
    transition: transform 0.2s ease, filter 0.2s ease;
    text-decoration: none !important;
    cursor: pointer;
}

a.etk-event-ig:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
}

.etk-ig-icon {
    width: 26px;
    height: 26px;
}

/* ─── Calendar Table — Equal row heights ─── */
.etk-calendar-table tbody td {
    border: 2px solid #3F51B5;
    padding: 10px 8px 10px;
    text-align: center;
    vertical-align: top;
    position: relative;
    height: 140px;
    transition: background-color 0.2s ease;
}

.etk-has-event {
    text-align: left;
}

.etk-has-event .etk-day-number {
    text-align: right;
    display: block;
}

.etk-calendar-table tbody td:hover:not(.etk-empty) {
    background-color: #F5F5FF;
}

/* ─── Loading State ─── */
.etk-calendar-body.etk-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .etk-calendar-wrapper {
        padding: 10px;
    }

    .etk-widget-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .etk-month-name {
        font-size: 28px;
    }

    .etk-year {
        font-size: 20px;
    }

    .etk-nav-btn {
        width: 32px;
        height: 32px;
    }

    .etk-calendar-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .etk-date-filter {
        display: none;
    }

    .etk-month-tabs {
        gap: 6px;
    }

    .etk-month-tab {
        padding: 8px 16px;
        font-size: 15px;
    }

    .etk-calendar-table thead th {
        font-size: 16px;
        padding: 12px 4px;
    }

    .etk-calendar-table tbody td {
        padding: 6px 5px;
        min-height: 100px;
    }

    .etk-day-number {
        font-size: 20px;
    }

    .etk-event-title {
        font-size: 13px;
    }

    .etk-event-excerpt {
        font-size: 10px;
        -webkit-line-clamp: 2;
    }

    .etk-ig-icon {
        width: 20px;
        height: 20px;
    }

    .etk-event-card {
        padding: 4px 5px;
        min-height: 40px;
        border-left-width: 2px;
    }

    .etk-today .etk-day-number {
        width: 30px;
        height: 30px;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .etk-month-name {
        font-size: 22px;
    }

    .etk-year {
        font-size: 16px;
    }

    .etk-month-tabs,
    .etk-tabs-arrow {
        display: none;
    }

    .etk-date-filter {
        position: static;
        justify-content: center;
    }

    .etk-calendar-table thead th {
        font-size: 14px;
        padding: 8px 3px;
    }

    .etk-calendar-table tbody td {
        min-height: 80px;
        padding: 4px 3px;
    }

    .etk-day-number {
        font-size: 16px;
    }

    .etk-event-title {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }

    .etk-event-excerpt {
        display: none;
    }

    .etk-ig-icon {
        width: 18px;
        height: 18px;
    }

    .etk-event-card {
        min-height: 32px;
        padding: 3px 4px;
    }
}

