/* ============================================
   CORNERS ADJUSTER - Complete Styles
   Light Grey Theme + Neon Blue Accent
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ca-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    color: #1a1a1a;
}

/* ========== HEADER ========== */
.ca-header {
    background: linear-gradient(135deg, #4dc9f6, #3db8e5);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 15px rgba(77, 201, 246, 0.35);
}

.ca-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ca-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.ca-header-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.ca-header-sub {
    font-size: 12px;
    color: rgba(26,26,26,0.7);
    font-weight: 500;
}

/* ========== CONTAINER ========== */
.ca-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== UPLOAD AREA ========== */
.ca-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
}

.ca-upload-box {
    width: 100%;
    max-width: 550px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s;
}

.ca-upload-box:hover,
.ca-upload-box.drag-over {
    border-color: #4dc9f6;
    background: rgba(77, 201, 246, 0.03);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ca-upload-icon {
    margin-bottom: 15px;
}

.ca-upload-box h3 {
    font-size: 20px;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.ca-upload-box p {
    font-size: 14px;
    color: #555;
    margin-bottom: 4px;
}

.ca-upload-box span {
    font-size: 12px;
    color: #888;
}

/* ========== BUTTONS ========== */
.ca-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ca-btn-upload {
    background: #4dc9f6;
    color: #fff;
    box-shadow: 0 3px 12px rgba(77, 201, 246, 0.4);
    padding: 13px 28px;
    font-size: 15px;
}

.ca-btn-upload:hover {
    background: #3ab8e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(77, 201, 246, 0.5);
}

.ca-btn-download {
    background: linear-gradient(135deg, #4dc9f6, #3db8e5);
    color: #fff;
    width: 100%;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(77, 201, 246, 0.4);
}

.ca-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(77, 201, 246, 0.5);
}

.ca-btn-outline {
    background: #e8e8e8;
    color: #1a1a1a;
    width: 100%;
    justify-content: center;
}

.ca-btn-outline:hover {
    background: #ddd;
}

.ca-btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    background: #4dc9f6;
    color: #fff;
    border-radius: 6px;
}

.ca-btn-sm:hover {
    background: #3ab8e5;
}

/* ========== WORKSPACE ========== */
.ca-workspace {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Preview Panel */
.ca-preview-panel {
    flex: 1;
    min-width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ca-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
}

.ca-preview-head h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.ca-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 300px;
    background: #fafafa;
}

.ca-canvas-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-radius: 6px;
    background-image: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

#previewCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.ca-preview-foot {
    display: flex;
    justify-content: space-between;
    padding: 10px 18px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #888;
}

/* Controls Panel */
.ca-controls {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ca-controls-head {
    padding: 14px 18px;
    border-bottom: 2px solid #4dc9f6;
}

.ca-controls-head h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.ca-controls-body {
    padding: 18px;
    flex: 1;
}

/* Slider Group */
.ca-slider-group {
    margin-bottom: 16px;
}

.ca-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.ca-badge {
    background: #f0f0f0;
    color: #4dc9f6;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #4dc9f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(77, 201, 246, 0.5);
    border: 2px solid #fff;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4dc9f6;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(77, 201, 246, 0.5);
}

/* Presets */
.ca-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ca-preset {
    flex: 1;
    min-width: 45px;
    padding: 7px 10px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #555;
}

.ca-preset:hover {
    border-color: #4dc9f6;
    color: #4dc9f6;
}

.ca-preset.active {
    background: #4dc9f6;
    color: #fff;
    border-color: #4dc9f6;
}

/* Toggle */
.ca-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.ca-toggle input {
    display: none;
}

.ca-toggle-slider {
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.ca-toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.ca-toggle input:checked + .ca-toggle-slider {
    background: #4dc9f6;
}

.ca-toggle input:checked + .ca-toggle-slider::after {
    left: 20px;
}

/* Individual Sliders */
.ca-individual {
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 4px;
}

/* Actions */
.ca-actions {
    padding: 16px 18px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .ca-workspace {
        flex-direction: column;
    }
    .ca-controls {
        width: 100%;
    }
    .ca-header-title {
        font-size: 18px;
    }
    .ca-container {
        padding: 12px;
    }
    .ca-upload-box {
        padding: 35px 15px;
    }
}

@media (max-width: 500px) {
    .ca-header {
        padding: 12px 14px;
    }
    .ca-header-icon {
        width: 34px;
        height: 34px;
    }
    .ca-header-title {
        font-size: 16px;
    }
    .ca-header-sub {
        display: none;
    }
    .ca-container {
        padding: 8px;
    }
    .ca-preview-body {
        padding: 10px;
        min-height: 200px;
    }
    .ca-controls-body {
        padding: 12px;
    }
    .ca-actions {
        padding: 12px;
    }
    .ca-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .ca-preset {
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* WordPress Admin */
.wp-admin .ca-wrapper {
    margin: 0 0 0 -20px;
}

@media (max-width: 782px) {
    .wp-admin .ca-wrapper {
        margin-left: -10px;
    }
}