/* Ribbon Style Toolbar */
.ribbon-container {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Ribbon Tabs Row */
.ribbon-tabs {
    display: flex;
    align-items: center;
    background: #e9ecef;
    padding: 0;
    border-bottom: 1px solid #dee2e6;
    gap: 0;
}

.ribbon-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s;
}

.ribbon-tab:hover {
    background: #dee2e6;
}

.ribbon-tab.active {
    background: #fff;
    border-bottom-color: #0d6efd;
    color: #0d6efd;
}

/* Compact Always-Visible Groups */
.ribbon-compact-groups {
    display: flex;
    gap: 8px;
    margin-left: auto;
    padding: 4px 10px;
}

.ribbon-compact-group {
    display: flex;
    gap: 2px;
    padding: 2px 8px;
    border-left: 1px solid #dee2e6;
}

.ribbon-compact-group:first-child {
    border-left: none;
}

/* Ribbon Content Area */
.ribbon-content {
    display: none;
    background: #fff;
    padding: 10px 15px;
    min-height: 80px;
}

.ribbon-content.active {
    display: block;
}

/* Ribbon Groups inside content */
.ribbon-group {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 15px;
    border-right: 1px solid #e9ecef;
    margin-right: 10px;
}

.ribbon-group:last-child {
    border-right: none;
}

.ribbon-group-label {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
    font-weight: 500;
}

.ribbon-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 400px;
}

/* Ribbon Buttons */
.ribbon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.ribbon-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.ribbon-btn .icon {
    font-size: 20px;
    margin-bottom: 3px;
}

.ribbon-btn .label {
    font-size: 10px;
    color: #495057;
    text-align: center;
}

/* Compact button style for always-visible groups */
.ribbon-btn-compact {
    padding: 6px 10px;
    min-width: auto;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.ribbon-btn-compact:hover {
    background: #fff;
    border-color: #dee2e6;
}

/* Enhanced Eraser Button in Compact Toolbar */
.ribbon-btn-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    min-width: 60px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 4px;
}

.ribbon-btn-enhanced:hover {
    background: #e9ecef;
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ribbon-btn-enhanced.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.ribbon-btn-enhanced .btn-label {
    font-size: 10px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ribbon-btn-enhanced.active .btn-label {
    color: white;
}

.ribbon-btn-enhanced .btn-icon {
    font-size: 24px;
}

/* Page Counter Display */
.page-counter-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    min-width: 80px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    gap: 4px;
}

.page-counter-display .counter-label {
    font-size: 10px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-counter-display .counter-value {
    font-size: 16px;
    font-weight: bold;
    color: #0d6efd;
    font-family: 'Courier New', monospace;
}

.page-counter-display .counter-total {
    font-size: 12px;
    color: #6c757d;
}
