/* ===================================
   GOTO PAGE STYLES
   =================================== */

.goto-page {
    max-width: 800px;
    margin: 10px auto 40px;
    direction: ltr;
}

/* Search row */
.goto-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

#goto-input {
    flex: 1;
    font-size: 1.15em;
    padding: 13px 16px;
    border: 2px solid #c8dfc9;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    background: white;
    color: #222;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#goto-input:focus {
    border-color: #2c5f2d;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.12);
}

#goto-btn {
    padding: 13px 22px;
    background: #2c5f2d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s;
}

#goto-btn:not(:disabled):hover {
    background: #3d7a3f;
}

#goto-btn:disabled {
    background: #c5ccc5;
    cursor: not-allowed;
}

/* Hint bar */
.goto-hint {
    font-size: 0.88em;
    color: #2c5f2d;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: #edf7ee;
    border-radius: 6px;
    border-left: 3px solid #2c5f2d;
}

/* Results */
#goto-results {
    margin-top: 6px;
}

.result-section {
    margin-bottom: 24px;
}

.result-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ebebeb;
}

/* ── Card grids (matching surahs.css column logic) ── */

.goto-grid {
    display: grid;
    gap: 12px;
}

.goto-grid-pages  { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.goto-grid-juzes  { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.goto-grid-surahs { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ── Cards (mirroring .surah-card / .surah-card-inner) ── */

.goto-card {
    background-color: white;
    border: 2px solid #2c5f2d;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    user-select: none;
}

.goto-card:hover {
    background-color: #e8f5e9;
    transform: scale(1.02);
}

.goto-card:active {
    transform: scale(1.00);
}

/* Page cards — blue accent */
.goto-card-page {
    border-color: #2980b9;
}
.goto-card-page:hover {
    background-color: #eaf4fb;
}

/* Juz cards — amber accent */
.goto-card-juz {
    border-color: #c87800;
}
.goto-card-juz:hover {
    background-color: #fdf6e3;
}

/* ── Card inner layout (mirroring .surah-card-content) ── */

.goto-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.goto-card-main {
    font-size: 1.05em;
    font-weight: bold;
    color: #2c5f2d;
    flex-shrink: 0;
}

.goto-card-page .goto-card-main  { color: #1a5fa8; }
.goto-card-juz  .goto-card-main  { color: #a05e00; }

.goto-card-arabic {
    font-size: 1.4em;
    direction: rtl;
    text-align: right;
    color: #333;
    flex-grow: 1;
}

/* Empty state */
.result-empty {
    color: #aaa;
    text-align: center;
    padding: 36px 20px;
    font-style: italic;
    font-size: 0.95em;
}

/* Mobile */
@media (max-width: 768px) and (orientation: portrait) {
    .goto-grid-pages,
    .goto-grid-juzes,
    .goto-grid-surahs {
        grid-template-columns: 1fr;
    }

    #goto-input  { font-size: 1em;    padding: 11px 13px; }
    #goto-btn    { padding: 11px 16px; font-size: 0.95em; }
    .goto-card   { padding: 10px; }

    .goto-card-main   { font-size: 1em; }
    .goto-card-arabic { font-size: 1.3em; }
}

@media (max-width: 950px) and (orientation: landscape) {
    .goto-grid-surahs { grid-template-columns: repeat(2, 1fr); }
    .goto-grid-juzes  { grid-template-columns: repeat(3, 1fr); }
}
