/* Top Section Layout */
.contrast-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    margin-top: 60px;
}
#contrast-ratio.very-poor { color: #CF1818; }
#contrast-ratio.poor { color: #CF1818; }
#contrast-ratio.good { color: #B15E0B; }
#contrast-ratio.very-good { color: #43A047; }
#contrast-ratio.super { color: #2E7D32; }

/* Upload Section */
.upload-box-section {
    background: #FAF5FF;
    border: 1px dashed #E5D5FF;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-text {
    color: #666;
    font-size: 14px;
    font-weight: 700;
}

.format-info {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}


.bordi-upload-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.bordi-upload-box.drag-over {
    background-color: #F3E8FF;
    border-style: solid;
}
.choose-file-button {
    border-color: #8E56DC !important;
    background-color: #8E56DC !important;
    color: white;
    padding: 3px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.15), 0 1px 3px hsla(250, 84%, 38%, 0.25), 0 2px 6px hsl(250deg 62.86% 2.64% / 48%), 0 6px 10px -2px hsl(0deg 0% 0% / 17%);
    transition: background-color 0.2s ease;
}

.upload-info {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

input[type="file"] {
    display: none;
}

/* WCAG Results */
.wcag-results {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}


.result-row:last-child {
    margin-bottom: 0;
}

.status-badges {
    display: flex;
    gap: 16px;
}

.wcag-badge,
.badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pass {
    background-color: #E9F9F0;
    color: #2B814F;
}

.fail {
    background-color: #FEE1E2;
    color: #CF1818;
}

/* Contrast ratio and tags */
.ratio-value {
    font-size: 20px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.ratio-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-row:first-child {
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 12px;
}

#contrast-ratio {
    font-size: 23px;
    font-weight: 500;
}

.ratio-value.very-poor { color: #CF1818; }
.ratio-value.poor { color: #CF1818; }
.ratio-value.good { color: #B15E0B; }
.ratio-value.very-good { color: #43A047; }
.ratio-value.super { color: #2E7D32; }

.rating-tag {
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.rating-tag.very-poor { background: #FEE1E2; color: #CF1818; }
.rating-tag.poor { background: #FEE1E2; color: #CF1818; }
.rating-tag.good { background: #FFF1E3; color: #B15E0B; }
.rating-tag.very-good { background: #DCF6E8; color: #2B814F; }
.rating-tag.super { background: #DCF6E8; color: #2B814F; }


/* Image Container */
.bordi-image-container {
    position: relative;
    height: 450px;
    margin: auto;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    margin-bottom: 20px;
}

#bordi-canvas {
    width: 100%;
    height: 100%;
}

.bordi-draggable-wrapper {
    position: absolute;
    padding: 5px;
    border: 10px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    cursor: grab;
}

.bordi-text-box {
    padding: 8px 12px;
    border: 2px solid rgb(0, 0, 0);
    font-size: 16px;
    color: white;
    user-select: none;
    background-color: transparent;
    min-width: 80px;
    min-height: 20px;
    white-space: nowrap;
    word-wrap: break-word;
    position: relative;
    cursor: text;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

select#bordi-font-weight {
    height: 35px;
    padding: 0 12px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-size: 14px;
    min-width: 100px;
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

.text-settings {
    display: flex;
    align-items: center;
    gap: 24px;
}

.settings-group {
    display: flex;
    align-items: center;
}
.label {
    font-weight: 600;
}
.settings-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #3B3F44;
    margin-right: 12px;
    white-space: nowrap;
}

.settings-group select {
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    background: white;
    min-width: 120px;
    font-size: 14px;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-input-group input[type="text"] {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-size: 14px;
}

.color-input-group input[type="color"] {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
}

/* Direction Controls */
.direction-controls {
    display: flex;
    gap: 8px;
}

.direction-controls button {
    padding: 8px 25px;
    background: #3c4045;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.direction-controls button:hover {
    background: #4B5563;
}
@media (min-width: 769px) and (max-width: 1080px) {
    .bottom-controls {
        gap: 13px;
    }
    .direction-controls button {
        padding: 8px 7px;
    }
}
/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contrast-top-section {
        grid-template-columns: 1fr;
    }
    
    .bottom-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .text-settings {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .settings-group {
        width: 100%;
    }
    
    .direction-controls {
        justify-content: center;
        width: 100%;
    }
}

/* Contrast Rating Colors */
.contra-ratio.very-poor { color: #CF1818; }
.contra-ratio.poor { color: #CF1818; }
.contra-ratio.good { color: #B15E0B; }
.contra-ratio.very-good { color: #43A047; }
.contra-ratio.super { color: #2E7D32; }

.contra-rating.very-poor { background: #FEE1E2; color: #CF1818; }
.contra-rating.poor { background: #FEE1E2; color: #CF1818; }
.contra-rating.good { background: #FFF1E3; color: #B15E0B; }
.contra-rating.very-good { background: #DCF6E8; color: #2B814F; }
.contra-rating.super { background: #DCF6E8; color: #2B814F; }




/* Custom Dropdown Styling */
.contra-dropdown-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 6px 12px;
    width: 198px;
    position: relative;
    cursor: pointer;
}

.contra-dropdown-box .selected-text {
    font-size: 0.9rem;
    color: rgb(93 95 99);
    font-weight: 500;
}

.contra-dropdown-box::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 10px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234B5563'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

.contra-dropdown-box.open::after {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 4px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dropdown-options .option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgb(93 95 99);
}

.dropdown-options .option:hover {
    background: #f8f8f8;
}

/* Color preview in color box */
.contra-color-box .color-preview {
    width: 34px;
    height: 28px;
    background: currentColor;
    border-radius: 4px;
    border: 1px solid #ddd;
}


@media (max-width: 676px) {
    #remove-bg {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        flex-direction: row;
    }

}