/* Scribing System Styles */

/* Scribing Button - appears in skill rows */
.skill-scribing-button {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border: 2px solid var(--color-primary);
    border-radius: 50%; /* Circular button */
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.skill-scribing-button:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.skill-scribing-button img {
    width: 30px;
    height: 30px;
}

/* Modal Styles */
.scribing-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.scribing-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
}

.scribing-selector-window {
    position: absolute;
    left: 20.5%;
    top: 17%;
    width: 59%;
    height: 75.5%;
    max-height: 800px;
    /* background-color: #1a1a1a; */
    background-image: url('/graphics/scribing_background.png'); /* possibly move to content */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--color-secondary);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 2500;
}

.scribing-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to right, var(--color-secondary), #2a2a2a);
    border-bottom: 1px solid var(--color-secondary);
    border-radius: 30px 30px 0 0;
}

.scribing-selector-header h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.scribing-selector-close {
    padding: 5px 10px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.scribing-selector-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.scribing-selector-content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

.scribing-left-panel h3,
.scribing-center-panel h3,
.scribing-right-panel h3 {
    color: var(--color-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
    text-align: center;
}

/* Left Panel */
.scribing-left-panel {
    width: 25%;
    background: linear-gradient(to bottom, rgb(0, 0, 0) 35%, rgba(10, 10, 10, 0.0));
    border-radius: 20px;
    padding: 15px;
    overflow-y: hidden;
}

.scribing-slot {
    position: relative;
    width: 100%;
    height: 95px;
    margin-bottom: 15px;
    background: rgba(42, 42, 42, 0.7);
    border: 2px solid #666;
    border-radius: 15px;
    display: flex;
    flex-direction: column; /* Changes to column layout */
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    pointer-events: auto; 
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.scribing-slot.occupied {
    border-color: var(--color-primary);
    background: rgba(10, 74, 10, 0.5);
}

.scribing-slot.drag-over {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.2);
    transform: scale(1.02);
}

.scribing-slot.invalid-drop {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.2);
}

.script-item.dragging {
    opacity: 0.5;
}

.scribing-slot .slot-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 6px; /* Change from margin-right to margin-bottom */
    border-radius: 4px;
    pointer-events: none;
}

.scribing-slot .slot-label {
    color: #ccc;
    font-size: 14px;
    pointer-events: none;
}

/* Center Panel */
.scribing-center-panel {
    flex: 0 0 35%;
    background: linear-gradient(to bottom, #000000a0 25%, #00000000) 55%;
    border-radius: 25px;
    padding: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) #1a1a1a;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 1),
        0 0px 10px rgba(0, 0, 0, 1),
        0 0px 15px rgba(0, 0, 0, 1);
}

.script-category {
    margin-bottom: 20px;
}

.script-category h4 {
    color: var(--color-primary);
    margin-bottom: 10px;
    padding-bottom: 5px;
    padding-left: 1%;  /* Added */
    border-bottom: 2px solid #444;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 1),
        0 0px 10px rgba(0, 0, 0, 1),
        0 0px 15px rgba(0, 0, 0, 1),
        0 0px 20px rgba(0, 0, 0, 1);
}

.script-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 5px 10px;
    background: rgba(24, 24, 24, 0.7);
    border: 1px solid #444;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.script-item:hover {
    background: rgba(69, 69, 69, 0.9);
    border-color: var(--color-primary);
}

.script-item.selected {
    background: rgba(10, 74, 10, 0.7);
    border-color: var(--color-success);
}

.script-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border: 1px solid #666;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.script-name {
    color: #ccc;
    font-size: 16px;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
    flex: 1;
}

.script-item.selected .script-name {
    color: var(--color-primary);
    font-weight: bold;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.script-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-left: 20%;
    padding-right: 10px;
}

/* Right Panel */
.scribing-right-panel {
    flex: 1;
    background: rgba(0, 0, 0, 0.0); /* hidden */
    border-radius: 8px;
    padding-top: 20px;
    padding-left: 5px;
    padding-right: 10px;
    padding-bottom: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) #1a1a1a;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 1),
        0 0px 10px rgba(0, 0, 0, 1),
        0 0px 15px rgba(0, 0, 0, 1),
}

.scribed-skill-tooltip {
    background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
    border: 2px solid #444;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.tooltip-skill-name {
    color: var(--color-primary);
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
}

/* Skill stats section */
.skill-stats {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.skill-stats div {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

.skill-stats .stat-label {
    color: #bca784ff;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 1),
        0 0px 10px rgba(0, 0, 0, 1),
        0 0px 15px rgba(0, 0, 0, 1),
}

.skill-stats .stat-value {
    color: #fff;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 1),
        0 0px 10px rgba(0, 0, 0, 1),
        0 0px 15px rgba(0, 0, 0, 1),
}

.tooltip-sections {
    text-align: center;
    /* No changes needed */
}

.tooltip-section {
    margin-bottom: 10px;
    padding: 8px;
    
    border-radius: 15px;
}

.tooltip-section p {
    color: #ddd;
    font-size: 13px;
    text-shadow: 
        0 0px 5px rgba(0, 0, 0, 1),
        0 0px 10px rgba(0, 0, 0, 1),
        0 0px 15px rgba(0, 0, 0, 1);
    line-height: 1.4;
    margin: 0;  /* Remove default margins */
}

.tooltip-section p.no-selection {
    color: #ff3333;
    font-style: italic;
}

.scribing-selector-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #2a2a2a;
    border-top: 1px solid var(--color-primary);
    border-radius: 0 0 8px 8px;
}