/* =============================================================================
   EDITOR LAYOUT - Build Sheet Container System
   =============================================================================
   Provides flexible wrapper structure for build editor, matching the 
   view-build page structure for consistent layout behavior.
   ============================================================================= */

/* =============================================================================
   BODY LAYOUT (Editor Mode)
   ============================================================================= */

body.editor-mode {
    display: flex;
    flex-direction: column;
}

body.editor-mode .main-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* =============================================================================
   NAV SPACER
   ============================================================================= */

body.editor-mode .nav-spacer {
    flex-shrink: 0;
    /* Height set dynamically via JS, fallback here */
    height: 16vh;
}

/* =============================================================================
   MAIN CONTENT CONTAINER (Editor Mode)
   ============================================================================= */

body.editor-mode .main-content {
    flex: 1 0 auto;
    position: relative;
    margin-top: 0;
    margin-left: 0;
    padding-top: 18px;
    padding-left: 2%;
    padding-right: 2%;
    padding-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}

/* =============================================================================
   BUILD SHEET SECTION (Center Column)
   ============================================================================= */

.build-sheet-section {
    position: relative;
    width: 62%;
    min-width: 920px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
}

/* Report Issue Button */
.report-issue-btn {
    position: absolute;
    top: 3%;
    right: 6.65%;
    height: 45px;
    width: auto;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 187, 51, 0.9);
    border-radius: 25px;
    color: rgba(255, 187, 51, 1);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding-bottom: 4px;
    z-index: 50;
}

.report-issue-btn:hover {
    opacity: 1;
    background: rgba(7, 6, 20, 0.9);
    font-weight: 600;
    border-color: rgba(255, 187, 51, 0.8);
    transform: scale(1.2);
}

/* Subscriber editors get wider layout (no ads) */
body.editor-subscribed .build-sheet-section {
    width: 89.5%;
}

#build-sheet-container {
    width: 100%;
    min-height: 500px;
}

/* Container with 4/3 aspect ratio (matches view-build) */
.build-sheet-container.editor-mode {
    position: relative;
    width: 100%;
    min-width: 900px;
    aspect-ratio: 3 / 2;
    background-color: var(--color-background, #000);
    border: 2px solid #4a3728;
    border-radius: 30px;
    overflow: hidden;
    padding: 1%;
    box-sizing: border-box;
}

/* Build sheet fills the container */
.editor-mode .build-sheet {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 600px;
    background-color: var(--color-background);
    border: none;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =============================================================================
   PANEL POSITIONING (Editor Mode)
   Matches view-build.css lines 700-753
   ============================================================================= */

/* Left Panel - Gear Display */
.editor-mode .build-left {
    position: absolute;
    left: 0.5%;
    top: 0.5%;
    width: 29%;
    height: 98%;
    background: linear-gradient(to bottom, var(--color-background) 25%, var(--color-secondary));
    border: 4px solid #0c2002;
    border-radius: 20px;
    overflow: hidden;
}

/* Center Panel */
.editor-mode .build-center {
    position: absolute;
    left: 30.15%;
    top: 0.5%;
    width: 43.5%;
    height: 72%;
}

/* Right Panel - Configuration */
.editor-mode .build-right {
    position: absolute;
    right: 0.5%;
    top: 0.75%;
    width: 25%;
    height: 78.5%;
    background: linear-gradient(to bottom, var(--color-background) 25%, var(--color-secondary));
    border: 4px solid #0c2002;
    border-radius: 20px;
    padding: 1%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Bottom Panel - Skills */
.editor-mode .build-bottom {
    position: absolute;
    left: 30.5%;
    top: 69%;
    width: 44%;
    height: 30%;
}

/* =============================================================================
   TAB SYSTEM (Editor Mode)
   Matches view-build.css lines 759-769
   ============================================================================= */

.editor-mode .build-center-title {
    position: absolute;
    top: -5.5%;
    left: -2%;
    width: 96%;
    height: 9%;
    padding: 0%;
    margin-bottom: 2%;
    color: var(--color-primary);
    font-size: clamp(3.5vb, 2.9rem, 3.5vb);
    font-weight: bold;
    text-align: center;
    text-shadow: var(--shadow-sm);
    overflow-y: hidden;
    z-index: 10;
}
.editor-mode .build-sheet-tabs {
    position: absolute;
    display: flex;
    height: 10%;
    width: 44%;
    left: 30%;
    top: -2%;
    gap: 3%;
    justify-content: center;
    z-index: 10;
}

/* =============================================================================
   CONSUMABLES POSITIONING (Editor Mode)
   ============================================================================= */

.editor-mode .consumables-row {
    position: absolute;
    right: 3.5%;
    top: 82%;
    width: 18%;
    height: 17%;
    background: linear-gradient(to bottom, var(--color-background) 25%, var(--color-secondary));
    border: var(--border-thick);
    border-radius: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto 1fr;
    padding: 1%;
    padding-top: 3%;
    padding-right: 1%;
    gap: 4%;
    align-items: center;
    justify-items: center;
}

.editor-mode .consumables-row .build-bottom-conlabel {
    grid-column: 1 / -1;
    margin-top: 11.5%;
}

.editor-mode .consumables-row .con {
    position: relative;
    margin-top: 6%;
    left: -6%;
    width: 80%;
    aspect-ratio: 1/1;
    height: auto;
    background: var(--color-panel);

    box-shadow: var(--shadow-md), 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    cursor: pointer;
}

.editor-mode .consumables-row .con:hover {
    scale: 1.15; 
    box-shadow: 
        0 0 3px var(--color-primary),
        0 0 7px var(--color-primary),
        0 0 9px var(--color-primary);
    z-index: 100;
}

/* =============================================================================
   Skills Bar
   ============================================================================= */

.editor-mode .buildbottom-skillslabel {
    top: -5%;
    left: 28.5%;
}

.editor-mode .build-bottom-ultlabel {
    top: -5%;
    left: 86%;
}

.editor-mode .build-bottom .skills-row {
    bottom: 2%;
    left: 0%;
    width: 98%;
    padding: 3%;
    padding-top: 8%;
    padding-bottom: 5%;
    gap: 7%;
}

.editor-mode .build-bottom .skill-slot {
    position: relative;
    height: 95%;
}

.editor-mode .build-bottom .skills-row.werewolf-active {
    grid-template-rows: repeat(3, 1fr);
    gap: 5%;
    padding-top: 7%;
    padding-bottom: 5%;
}

.editor-mode.build-bottom-ultlabel.werewolf-active,
.editor-mode.buildbottom-skillslabel.werewolf-active {
    margin-top: 5%;
    padding-top: 5%;
    top: 50%;
}

/* =============================================================================
   Left Panel
   ============================================================================= */

.editor-mode .build-left-ap-label {
    position: absolute;
    top: 3.5%;
    left: 6%;
    width: auto;
    text-align: left;
}

.editor-mode .build-left-ac-label {
    position: absolute;
    top: 49%;
    left: 6%;
    text-align: left;
}

.editor-mode .build-left-we-label {
    position: absolute;
    top: 67%;
    left: 6%;
    text-align: left;
}

.editor-mode .build-left-stats-label {
    position: absolute;
    top: 0%;
    left: 0;
    width: 100%;
    height: 5%;
    margin-bottom: 2%;
    color: var(--color-text);
    font-size: clamp(2.5vb, 2.5rem, 2.5vb);
    font-weight: bold;
    text-align: center;
    text-shadow: var(--text-shadow-standard);
}
/* Buff List Styling */
.editor-mode .build-left-stats-list {
    position: absolute;
    top: 7%;
    width: 96%;
    height: 90%;
    overflow-y: auto;
    padding: 1rem;
}

.editor-mode .buff-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.editor-mode .buff-list li {
    font-size: 17px; 
    padding-bottom: 2.5%;
}

/* =============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================= */

@media (max-width: 1200px) {
    .editor-mode .build-sheet-tab {
        font-size: clamp(.9rem, 0.8vw, .9rem);
        padding: 4%;
    }
    
    .build-sheet-section {
        width: 85%;
    }
}

@media (max-width: 900px) {
    .build-sheet-container.editor-mode {
        aspect-ratio: auto;
        min-height: 500px;
    }
    
    .build-sheet-section {
        width: 95%;
        min-width: auto;
    }
    
    /* Stack panels vertically on smaller screens */
    .editor-mode .build-left,
    .editor-mode .build-center,
    .editor-mode .build-right {
        position: relative;
        width: 100%;
        left: auto;
        right: auto;
        top: auto;
        height: auto;
    }
    
    .editor-mode .build-bottom {
        position: relative;
        width: 100%;
        top: auto;
        left: auto;
    }
    
    .editor-mode .consumables-row {
        position: relative;
        width: 100%;
        right: auto;
        top: auto;
    }
}
/* =============================================================================
   WEAPON BAR TOGGLE - 3 Button Width Adjustment
   ============================================================================= */

.editor-mode .weapon-bar-toggle {
    width: 45%;
}

/* =============================================================================
   ACTIVE BUFFS PANEL - PvP/Cyrodiil Sections
   ============================================================================= */

/* Gold Header */
.editor-mode .build-left-stats-label.gold {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    margin-bottom: 0px ;
}

/* Buff Divider */
.editor-mode .buff-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #4a3728, transparent);
    margin: 8px 0;
}

/* Battle Spirit Section */
.editor-mode .pvp-buff-section {
    margin-bottom: 4px;
}

.editor-mode .buff-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 15px;
}

.editor-mode .buff-name {
    color: #e0e0e0;
}

/* Cyrodiil Section */
.editor-mode .cyrodiil-buff-section {
    margin-bottom: 4px;
}

.editor-mode .cyrodiil-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 6px 0;
    background: transparent;
    border: none;
    color: #ffd700;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.editor-mode .cyrodiil-header:hover {
    color: #ffed4a;
}

.editor-mode .cyrodiil-toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.editor-mode .cyrodiil-header[aria-expanded="true"] .cyrodiil-toggle-arrow {
    transform: rotate(90deg);
}

/* Cyrodiil Bonus Rows */
.editor-mode .cyrodiil-content {
    padding-left: 8px;
}

.editor-mode .cyrodiil-bonus-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
}

.editor-mode .bonus-name {
    color: #c0c0c0;
}

.editor-mode .bonus-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-mode .bonus-decrement,
.editor-mode .bonus-increment {
    width: 22px;
    height: 22px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid #4a3728;
    border-radius: 4px;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.editor-mode .bonus-decrement:hover,
.editor-mode .bonus-increment:hover {
    background: rgba(60, 60, 60, 0.9);
    border-color: #6a5a48;
    color: #ffd700;
}

.editor-mode .bonus-decrement:active,
.editor-mode .bonus-increment:active {
    transform: scale(0.95);
}

.editor-mode .bonus-value {
    min-width: 20px;
    text-align: center;
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
}

.editor-mode .bonus-value[data-active="true"] {
    color: #00ff00;
}

/* Hide collapsed divider when expanded */
.editor-mode .cyrodiil-header[aria-expanded="true"] + .cyrodiil-collapsed-divider {
    display: none;
}