/**
 * ConvMaster - CSS Border-Radius Generator Styles
 * 
 * @package    ConvMaster
 * @version    1.1.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--border-radius {
    background: linear-gradient(135deg, rgba(28, 110, 164, 0.2), rgba(59, 130, 246, 0.2));
    border-radius: 16px;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   BORDER-RADIUS GENERATOR WIDGET
   ===================================================== */
.border-radius-generator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   CORNERS LAYOUT
   ===================================================== */
.border-radius-generator__workspace {
    padding: 1.5rem;
}

.border-radius-generator__corners {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Corner Controls */
.corner-control {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.corner-control--top-left {
    grid-column: 1;
    grid-row: 1;
    border-top-left-radius: var(--radius-lg);
}

.corner-control--top-right {
    grid-column: 3;
    grid-row: 1;
    border-top-right-radius: var(--radius-lg);
}

.corner-control--bottom-left {
    grid-column: 1;
    grid-row: 3;
    border-bottom-left-radius: var(--radius-lg);
}

.corner-control--bottom-right {
    grid-column: 3;
    grid-row: 3;
    border-bottom-right-radius: var(--radius-lg);
}

.corner-control__input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.corner-form__input {
    width: 70px;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.corner-form__input:focus {
    outline: none;
    border-color: var(--primary);
}

.corner-form__slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-secondary);
    border-radius: 3px;
    cursor: pointer;
}

.corner-form__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.corner-form__slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.corner-form__slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.corner-control__checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.corner-control__checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.corner-control__checkbox label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* =====================================================
   PREVIEW BOX
   ===================================================== */
.border-radius-preview {
    grid-column: 2;
    grid-row: 1 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    min-height: 250px;
}

.border-radius-preview__box {
    width: 280px;
    height: 200px;
    background: var(--bg-secondary);
    border: 5px solid #1C6EA4;
    border-radius: 0;
    transition: border-radius 0.2s ease, border 0.2s ease;
}

/* =====================================================
   BORDER CONFIGURATION
   ===================================================== */
.border-radius-generator__border-config {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.border-config__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.border-config__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.border-config__row:first-child {
    padding-top: 0;
}

.border-config__row > label {
    min-width: 70px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.border-config__control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.border-config__control--color {
    gap: 0.5rem;
}

/* Width Presets */
.width-presets {
    display: flex;
    gap: 0.25rem;
}

.width-preset {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.width-preset:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.width-preset--active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Style Buttons */
.style-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.style-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.style-btn:hover {
    border-color: var(--primary);
    background: rgba(28, 110, 164, 0.1);
}

.style-btn--active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.style-btn--muted {
    color: var(--text-muted);
}

/* Border Form Inputs */
.border-form__input {
    width: 60px;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.border-form__input:focus {
    outline: none;
    border-color: var(--primary);
}

.border-form__input--hex {
    width: 80px;
    text-transform: uppercase;
}

.border-form__slider {
    flex: 1;
    min-width: 100px;
    max-width: 200px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-secondary);
    border-radius: 3px;
    cursor: pointer;
}

.border-form__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.border-form__slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.border-form__slider--opacity {
    max-width: 100px;
}

.border-form__color {
    width: 50px;
    height: 32px;
    padding: 2px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.border-form__color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.border-form__color::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.opacity-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 24px;
}

/* =====================================================
   CSS OUTPUT SECTION
   ===================================================== */
.border-radius-generator__css-output {
    background: #2d3748;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.css-output__header {
    margin-bottom: 0.75rem;
}

.css-output__header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #a0aec0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.css-output__code {
    background: #1a202c;
    border-radius: var(--radius-sm);
    padding: 1rem;
    min-height: 80px;
}

.css-output__code code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #68d391;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-all;
}

[data-theme="light"] .border-radius-generator__css-output {
    background: #edf2f7;
}

[data-theme="light"] .css-output__header h3 {
    color: #4a5568;
}

[data-theme="light"] .css-output__code {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .css-output__code code {
    color: #2f855a;
}

/* =====================================================
   ACTION BUTTONS
   ===================================================== */
.border-radius-generator__actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn--primary {
    background: var(--primary);
    color: white;
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: var(--bg-secondary);
}

.btn--outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn--outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn svg {
    flex-shrink: 0;
}

/* Privacy Info */
.border-radius-preview__info {
    text-align: center;
    padding: 0.75rem 1.5rem 1.5rem;
}

.border-radius-preview__info p {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--success);
    margin: 0;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Syntax Card */
.syntax-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.syntax-card code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
   HIDDEN ELEMENTS
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .border-radius-generator__corners {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
    }
    
    .corner-control--top-left {
        grid-column: 1;
        grid-row: 1;
    }
    
    .corner-control--top-right {
        grid-column: 2;
        grid-row: 1;
    }
    
    .border-radius-preview {
        grid-column: 1 / 3;
        grid-row: 2;
    }
    
    .corner-control--bottom-left {
        grid-column: 1;
        grid-row: 3;
    }
    
    .corner-control--bottom-right {
        grid-column: 2;
        grid-row: 3;
    }
    
    .border-config__row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .border-config__control {
        width: 100%;
    }
    
    .style-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .border-radius-generator__workspace {
        padding: 1rem;
    }
    
    .border-radius-preview__box {
        width: 100%;
        max-width: 200px;
        height: 150px;
    }
    
    .border-radius-generator__actions {
        flex-direction: column;
    }
    
    .border-radius-generator__actions .btn {
        width: 100%;
    }
}

/* =====================================================
   LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .corner-form__input,
[data-theme="light"] .border-form__input,
[data-theme="light"] .border-form__color {
    background: var(--bg-primary);
}

[data-theme="light"] .corner-control,
[data-theme="light"] .border-radius-generator__border-config,
[data-theme="light"] .border-radius-generator__css-output {
    background: var(--bg-secondary);
}

[data-theme="light"] .border-radius-preview__box {
    background: #f0f4f8;
}

[data-theme="light"] .css-output__code {
    background: var(--bg-primary);
}

[data-theme="light"] .style-btn,
[data-theme="light"] .width-preset {
    background: var(--bg-primary);
}

/* =====================================================
   COPY NOTIFICATION
   ===================================================== */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
