/* Scoped Styles for Ramadan Times Widget/Shortcode */
.rtw-root {
    --rtw-font: 'Tiro Bangla', serif;
    --rtw-bg-slate: #0f172a;
    --rtw-bg-slate-light: #1e293b;
    --rtw-emerald: #10b981;
    --rtw-emerald-dark: #059669;
    --rtw-teal: #14b8a6;
    --rtw-orange: #f97316;
    --rtw-white: #ffffff;
    --rtw-text-gray: #9ca3af;
    --rtw-border: #334155;

    font-family: var(--rtw-font);
    color: var(--rtw-white);
    box-sizing: border-box;
    width: 100%;
}

.rtw-root * {
    box-sizing: border-box;
}

/* Base Container */
.rtw-container {
    background: var(--rtw-bg-slate);
    border-radius: 1rem;
    padding: 1rem;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: background 1s ease;
}

/* Background Gradients */
.rtw-bg-morning {
    background: linear-gradient(135deg, #164e63, #1e3a8a);
}

.rtw-bg-afternoon {
    background: linear-gradient(135deg, #1e3a8a, #0c4a6e);
}

.rtw-bg-iftar {
    background: linear-gradient(135deg, #7c2d12, #78350f);
}

.rtw-bg-night {
    background: var(--rtw-bg-slate);
}

/* Header */
.rtw-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
}

.rtw-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    background: linear-gradient(to right, #34d399, #99f6e4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rtw-subtitle {
    font-size: 0.875rem;
    color: var(--rtw-text-gray);
    letter-spacing: 0.05em;
}

/* Dua Toggle & Section */
.rtw-dua-toggle {
    background: none;
    border: none;
    color: #6ee7b7;
    /* emerald-300 */
    font-size: 0.75rem;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
    display: inline-block;
}

.rtw-dua-toggle:hover {
    color: #a7f3d0;
}

.rtw-dua-section {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rtw-dua-box {
    margin-bottom: 1rem;
}

.rtw-dua-box:last-child {
    margin-bottom: 0;
}

.rtw-dua-title {
    font-size: 0.875rem;
    font-weight: 700;
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--rtw-border);
}

.rtw-dua-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.rtw-dua-sub {
    font-size: 0.75rem;
    color: var(--rtw-text-gray);
    margin-top: 0.25rem;
}

.rtw-text-emerald {
    color: #34d399;
}

.rtw-text-orange {
    color: #fb923c;
}

/* District Select */
/* District Select */
.rtw-district-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    margin-top: 0.75rem;
    background-color: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.9rem;
    font-family: var(--rtw-font);
    cursor: pointer;
    width: auto;
    max-width: 100%;
    outline: none;
    transition: all 0.2s ease;

    /* Custom Chevron */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.rtw-district-select:hover {
    background-color: rgba(30, 41, 59, 1);
    border-color: #64748b;
}

.rtw-district-select:focus {
    border-color: var(--rtw-emerald);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.rtw-district-select option {
    background-color: #0f172a;
    color: white;
    padding: 4px;
}

/* Countdown Card */
.rtw-countdown-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.rtw-countdown-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #34d399;
    margin-bottom: 0.5rem;
    border: 1px solid var(--rtw-border);
}

.rtw-countdown-time {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

/* Info Grid */
.rtw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rtw-info-box {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid var(--rtw-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rtw-label-sm {
    font-size: 0.75rem;
    color: var(--rtw-text-gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rtw-time-lg {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.rtw-text-indigo {
    color: #818cf8;
}

/* Schedule List */
.rtw-schedule-list {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    padding: 0.25rem;
    margin-bottom: 1rem;
}

.rtw-schedule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
    margin-bottom: 2px;
}

.rtw-schedule-item:hover {
    background: rgba(30, 41, 59, 0.8);
}

.rtw-schedule-item.rtw-active {
    background: #1e293b;
    border-left: 3px solid var(--rtw-emerald);
}

.rtw-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rtw-icon-box {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.rtw-bg-indigo-soft {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.rtw-bg-teal-soft {
    background: rgba(20, 184, 166, 0.2);
    color: #2dd4bf;
}

.rtw-bg-orange-soft {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.rtw-item-name {
    font-weight: 500;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.rtw-item-time {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Full Table */
.rtw-toggle-container {
    text-align: center;
    margin-bottom: 1rem;
}

.rtw-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.6);
    color: var(--rtw-text-gray);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.rtw-toggle-btn:hover {
    color: var(--rtw-white);
    background: rgba(30, 41, 59, 1);
}

.rtw-full-calendar {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 0.75rem;
    border: 1px solid var(--rtw-border);
    overflow: hidden;
}

.rtw-table-responsive {
    overflow-x: auto;
}

.rtw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.rtw-table th {
    background: #020617;
    color: var(--rtw-text-gray);
    padding: 0.75rem 1rem;
    font-weight: 700;
}

.rtw-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid #1e293b;
    color: #cbd5e1;
}

.rtw-table tr.rtw-today-row {
    background: rgba(16, 185, 129, 0.1);
    border-left: 2px solid var(--rtw-emerald);
}

.rtw-table tr.rtw-today-row td {
    color: white;
}

/* Compact Widget Layout */
.rtw-compact .rtw-title {
    font-size: 1.1rem;
}

.rtw-compact .rtw-countdown-time {
    font-size: 1.75rem;
}

.rtw-compact .rtw-info-box {
    padding: 0.5rem;
}

.rtw-compact .rtw-time-lg {
    font-size: 1.2rem;
}

.rtw-compact-cta {
    display: block;
    text-align: center;
    background: var(--rtw-emerald);
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    margin-top: 0.75rem;
    font-weight: 600;
}

.rtw-compact-cta:hover {
    background: var(--rtw-emerald-dark);
}

/* Azan Consent Button */
.rtw-azan-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.rtw-azan-consent-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: #34d399;
}

/* Azan Toast */
.rtw-azan-toast {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.rtw-azan-toast.rtw-toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Icon colors in toast */
.rtw-toast-icon {
    font-size: 1.1em;
}

/* Utilities */
.rtw-hidden {
    display: none !important;
}