/* css/firefox.css */
/* Firefox Offline Window Styles - Chrome-style offline page */

.firefox-window {
    /* Specific initial dimensions and position as requested */
    width: 1000px;
    height: 700px;
    left: 110px;
    top: 90px;
    min-width: 600px;
    min-height: 400px;
    /* Remove all !important overrides to allow normal dragging/resizing */
    background: rgb(255, 255, 255);
    backdrop-filter: none;
    border: 1px solid #1C1B21;
}

.firefox-window .title-bar {
    background: #1C1B21;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 32px;
    /* Remove cursor override to allow normal dragging */
}

.firefox-window .title-bar .title-text {
    color: #fff;
    font-weight: normal;
}

.firefox-content {
    padding: 0;
    background: rgb(255, 255, 255);
    height: calc(100% - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.firefox-offline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0 0 0;
    box-sizing: border-box;
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.firefox-offline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 600px;
    margin-bottom: 20px;
    order: 2;
}

.firefox-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    width: 100%;
    height: 60%;
    overflow: hidden;
    order: 1;
}

.firefox-game-container iframe {
    width: 80%;
    height: 70%;
    max-width: 900px;
    max-height: 400px;
    border: none;
    overflow: hidden;
    scrolling: no;
}

.firefox-error-icon {
    margin-bottom: 30px;
}

.firefox-dino {
    width: 88px;
    height: 88px;
    opacity: 0.6;
}

.firefox-error-details {
    text-align: left;
    width: 100%;
}

.firefox-error-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
}

.firefox-error-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: left;
}

.firefox-error-suggestions {
    text-align: left;
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
    padding-left: 0;
    list-style: none;
}

.firefox-error-suggestions li {
    margin: 4px 0;
    padding-left: 16px;
    position: relative;
}

.firefox-error-suggestions li::before {
    content: "• ";
    position: absolute;
    left: 0;
    color: #999;
}

.firefox-error-code {
    font-size: 12px;
    color: #999;
    font-family: monospace;
    margin: 16px 0 0 0;
    text-align: left;
}

#dino-game-canvas {
    border: none;
    background: transparent;
    cursor: pointer;
    margin-bottom: 16px;
}

.firefox-game-instructions {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    font-family: monospace;
}

.firefox-game-score {
    font-size: 12px;
    color: #666;
    font-family: monospace;
    letter-spacing: 2px;
}

.firefox-game-container.game-over .firefox-game-instructions {
    color: #d93025;
}

/* Prevent user selection in game area */
.firefox-game-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Ensure canvas doesn't cause horizontal scroll */
.firefox-game-container canvas {
    max-width: 100%;
}

/* Firefox Navigation Toolbar */
.firefox-toolbar {
    display: flex;
    align-items: center;
    background: #42414D;
    border-bottom: 1px solid #2A2A2E;
    height: 40px;
    padding: 0 10px;
    gap: 8px;
    flex-shrink: 0;
}

.firefox-nav-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.firefox-nav-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.firefox-nav-btn img {
    max-width: 16px;
    max-height: 16px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.2s;
}

.firefox-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.firefox-nav-btn:disabled {
    cursor: default;
}

.firefox-nav-btn:disabled img {
    opacity: 0.3;
}

.firefox-address-bar {
    flex: 1;
    margin: 0 8px;
}

.firefox-url-container {
    background: #23222B;
    border: 1px solid #3A3944;
    border-radius: 6px;
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}

.firefox-url-icon {
    max-width: 16px;
    max-height: 16px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.firefox-url-text {
    flex: 1;
    color: #FBFBFE;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.firefox-url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #FBFBFE;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 0;
    margin: 0;
    /* Middle ellipsis effect */
    text-overflow: ellipsis;
    direction: rtl;
    text-align: left;
    unicode-bidi: plaintext;
}

.firefox-url-input:focus {
    direction: ltr;
}

.firefox-url-input[readonly] {
    cursor: pointer;
}

.firefox-url-input[readonly]:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.firefox-bookmark-icon {
    max-width: 16px;
    max-height: 16px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.1s;
}

.firefox-bookmark-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.firefox-bookmark-icon:active {
    transform: scale(0.95);
}

.firefox-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.firefox-toolbar-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.firefox-toolbar-btn img {
    max-width: 16px;
    max-height: 16px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.firefox-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.firefox-toolbar-btn:hover img {
    opacity: 1;
}

/* Use more specific selector to override responsive viewport rules */
.finder-window.firefox-window {
    /* Override responsive viewport constraints with specificity and !important */
    max-width: none !important;
    max-height: none !important;
    width: 1000px;
    height: 700px;
}