/**
 * Widget Bileşenleri CSS
 * Hava durumu, namaz vakitleri, oyun ve diğer widget stilleri
 */

/* ================================
   PLAYER VE GRID TEMEL STİLLERİ
   ================================ */

.sosyal-site-player {
    position: relative;
}

.item-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 10;
}

.move-screen-button {
    /* İkonun daha iyi görünmesi için gerekirse ek stil eklenebilir */
}

.move-screen-popup {
    position: absolute;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px;
    z-index: 1006;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.move-screen-option {
    padding: 5px 8px;
    color: white;
    background-color: #444;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
}

.move-screen-option:hover {
    background-color: #555;
}

.move-screen-option.disabled {
    background-color: #2a2a2a;
    color: #777;
    cursor: not-allowed;
}

.layout-hidden {
    display: none !important;
    visibility: hidden !important;
}

/* ================================
   HAVA DURUMU WIDGET STİLLERİ
   ================================ */

.weather-widget-content {
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow-y: hidden;
    height: 100%;
    box-sizing: border-box;
}

.weather-city {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 2px;
}

.weather-temp {
    font-size: 1.4em;
    margin: 2px 0;
}

.weather-desc {
    font-size: 0.9em;
    text-transform: capitalize;
}

.weather-icon {
    width: 50px;
    height: 50px;
}

.weather-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 90%;
    font-size: 0.8em;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.detail-label {
    margin-right: 5px;
}

.detail-value {
    font-weight: bold;
    text-align: right;
}

/* ================================
   NAMAZ VAKİTLERİ STİLLERİ
   ================================ */

.prayer-times-container {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    font-size: 0.85em;
}

.prayer-times-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.prayer-time-entry {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 0.9em;
}

.prayer-name {
    /* font-weight: 500; */
}

.prayer-time {
    font-weight: bold;
}

.prayer-times-error {
    font-size: 0.8em;
    color: #ffdddd;
    margin-top: 5px;
    padding: 5px;
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 3px;
    width: 90%;
    box-sizing: border-box;
}

.prayer-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 5px;
}

.prayer-items-grid .detail-item {
    padding: 3px 2px;
}

.prayer-items-grid .detail-label,
.prayer-items-grid .detail-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prayer-items-grid .detail-value {
    text-align: right;
}

/* ================================
   WIDGET HATA İÇERİĞİ
   ================================ */

.widget-error-content p {
    margin: 0;
    padding: 10px;
    color: #ffdddd;
    font-size: 0.9em;
}

/* ================================
   WIDGET PROMPT MODAL STİLLERİ
   ================================ */

.widget-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.widget-prompt-modal.visible {
    opacity: 1;
    visibility: visible;
}

.widget-prompt-content {
    background-color: #333;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.prompt-title {
    font-size: 1.2em;
    color: #eee;
    margin-bottom: 15px;
}

.prompt-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #555;
    background-color: #222;
    color: #eee;
    border-radius: 4px;
    font-size: 1em;
}

.prompt-buttons button {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.prompt-button-confirm {
    background-color: #5cb85c;
    color: white;
}

.prompt-button-confirm:hover {
    background-color: #4cae4c;
}

.prompt-button-cancel {
    background-color: #d9534f;
    color: white;
}

.prompt-button-cancel:hover {
    background-color: #c9302c;
}

/* ================================
   OYUN WIDGET STİLLERİ
   ================================ */

.game-widget-slot iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.widget-prompt-modal .game-selection-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
    border: 1px solid #555;
    background-color: #222;
    border-radius: 4px;
    padding: 5px;
}

.widget-prompt-modal .game-selection-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #eee;
    cursor: pointer;
    border-bottom: 1px solid #1e1919;
    transition: background-color 0.2s ease;
}

.widget-prompt-modal .game-selection-item:last-child {
    border-bottom: none;
}

.widget-prompt-modal .game-selection-item:hover {
    background-color: #5cb85c;
    color: white;
}

.widget-prompt-modal .game-item-logo,
.widget-prompt-modal .game-item-logo-placeholder {
    width: 40px;
    height: 30px;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 3px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #777;
}

.widget-prompt-modal .game-item-logo.default-game-logo {
    object-fit: cover;
}

.widget-prompt-modal .game-item-name {
    flex-grow: 1;
    font-size: 0.95em;
}

/* ================================
   OYNATMA LİSTELERİ PANEL STİLLERİ
   ================================ */

.playlists-trigger {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 55px;
    height: 130px;
    background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: #e0e0e0;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.25);
    transition: background 0.3s, left 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    padding: 10px 5px;
}

.playlists-trigger:hover {
    background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
}

.playlists-trigger.open {
    left: 380px;
}

.playlists-trigger .tab-text {
    font-size: 12px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-bottom: 8px;
    font-weight: 300;
    letter-spacing: 1px;
    font-family: Poppins, sans-serif;
}

.playlists-trigger .tab-arrow {
    font-size: 14px;
    transition: transform 0.3s;
}

.playlists-trigger.open .tab-arrow {
    transform: rotate(180deg);
}

.playlists-panel {
    position: fixed;
    top: 0;
    left: -380px;
    width: 380px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
}

.playlists-panel.open {
    left: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.playlists-content {
    padding: 15px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.playlist-item.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
}

.playlist-item .layout-indicator {
    font-size: 11px;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
}

.playlist-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}

.playlist-icon svg {
    width: 20px;
    height: 20px;
}

.playlist-info {
    flex: 1;
    min-width: 0;
}

.playlist-name {
    font-size: 13px;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.playlist-layout {
    font-size: 12px;
    color: #a0a0a0;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.playlist-count {
    font-size: 12px;
    color: #4facfe;
    background: rgba(79, 172, 254, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
}

.default-badge {
    font-size: 11px;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    padding: 3px 6px;
    border-radius: 4px;
}

.no-playlists {
    text-align: center;
    padding: 40px 20px;
    color: #a0a0a0;
}

.no-playlists svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-playlists p {
    margin: 0;
    font-size: 14px;
}

/* ================================
   MOBİL RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .playlists-panel {
        position: fixed;
        bottom: 0;
        left: 2.5%;
        right: 2.5%;
        top: auto;
        width: auto;
        max-width: 600px;
        height: auto;
        max-height: 80vh;
        margin: 0 auto;
        transform: translateY(100%);
        border-radius: 15px 15px 0 0;
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
        border-right: none;
        border-left: none;
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1002;
        backdrop-filter: blur(10px);
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 26, 46, 0.95) 100%);
    }

    .playlists-panel.open {
        transform: translateY(0px);
    }

    .playlists-trigger {
        position: fixed;
        bottom: 0;
        left: 50%;
        right: auto;
        top: auto;
        transform: translateX(-50%);
        width: 200px;
        height: 40px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        border-radius: 10px 10px 0 0;
        padding: 5px 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        transition: background 0.3s, bottom 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
        z-index: 1003;
    }

    .playlists-trigger.open {
        bottom: 80vh;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .playlists-trigger i {
        font-size: 18px !important;
        margin-bottom: 0 !important;
        margin-right: 8px;
    }

    .playlists-trigger .tab-text {
        writing-mode: initial;
        text-orientation: initial;
        margin-bottom: 0;
        margin-right: 8px;
        font-size: 14px;
        letter-spacing: normal;
        font-family: Poppins, sans-serif;
    }

    .playlists-trigger .tab-arrow {
        font-size: 12px;
        margin-left: 6px;
        transform: rotate(0);
    }

    .playlists-panel {
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE 10+ */
    }

    .playlists-panel::-webkit-scrollbar {
        display: none;
        /* Webkit */
    }
}