/* CSS for Shakespeare plays */
/* Copyright (c) 2025 Knowledge Share LLC, all rights reserved

:root {
    --print-font-size: 16pt; /* Default print size */
}

.font-controls {
    font-size: 14px;
}

#play-content.play-text {
    margin-left: -3px; /* Pull entire block slightly left if needed */
    tab-size: 2; /* Reduce tab width from default (usually 8) to 2 characters */
    -moz-tab-size: 2; /* Firefox support */
    -o-tab-size: 2; /* Opera support */
}

.print-controls {
    margin-top: 30px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.search-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-top: 1px solid #ccc;
    z-index: 500;
    
    /* Center the toolbar itself */
    /* width: fit-content;  Takes only the width it needs */
    max-width: 1000px; /* Prevents it from getting too wide */
    
    /* Center the elements inside the toolbar */
    display: flex;
    align-items: center;
    justify-content: center; /* This centers the flex items */
    gap: 8px;
}

.search-toolbar button {
    padding: 6px 10px;
    border-radius: 4px;
}

/* Style for the search input */
#searchInput {
    width: 200px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Style for the match count display */
#matchCount {
    margin-left: 8px;
    font-weight: bold;
    color: #333;
}

mark {
    background-color: yellow;
    color: black;
    padding: 0 2px;
    border-radius: 2px;
}

mark.current {
    background-color: orange;
}

@media print {
    /* Hide everything initially */
    body * {
        display: none;
    }
    
    /* Only show the play content */
    #play-content, #play-content * {
        display: block !important;
    }
    
    #play-content {
        font-family: 'Georgia', serif;
        line-height: 1.4;
        white-space: pre-wrap;
        margin: 0;
        padding: 0;
        /*   font-size: var(--print-font-size) !important; */
    }
    
    /* Remove any backgrounds */
    body, .container, #play-content {
        background: none;
        box-shadow: none;
    }
    
    .font-controls, .play-nav, .print-controls {
        display: none;
    }
}

/* Responsive font sizing for play text only */
.play-text {
    font-size: 16px; /* Base font size for desktop */
}

/* Tablet adjustments */
@media screen and (max-width: 768px) {
    .play-text {
        font-size: 13px; /* Smaller font for tablets */
    }
}

/* Phone adjustments */
@media screen and (max-width: 480px) {
    .content-wrapper {
        /* adjust Sk-general css for this page */
        padding: 5px;
        margin: 2px;
    }
    
    .play-text {
        font-size: 10px; /* Even smaller font for phones */
        line-height: 1.3; /* Tighter line height for better readability */
        font-family: "Consolas", "Liberation Mono", "DejaVu Sans Mono", monospace; /* Slightly narrower monospace options */
        letter-spacing: -0.05em; /* Slightly reduce space between characters */
    }
    
    #play-container {
        padding: 0; /* Reduce padding around the play text */
    }
    
    .font-controls button {
        font-size: 12px; /* Even smaller font for phones */
        /* padding: 8px 12px;  Larger touch targets for buttons */
        margin: 0 3px;
    }
    
    .search-toolbar button {
        padding: 4px 6px;
        border-radius: 4px;
    }
    
    /* Style for the search input */
    #searchInput {
        width: 120px;
        padding: 6px 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }
    
    /* Style for the match count display */
    #matchCount {
        font-size: 12px;
        margin-left: 8px;
        font-weight: bold;
        color: #333;
    }
}