/* Controls Panel - Settings and export interface */

.crochet-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Pattern Settings Section */
.crochet-settings-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.crochet-settings-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.crochet-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.crochet-input-wrapper {
    position: relative;
}

.crochet-input-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.crochet-number-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.crochet-number-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.crochet-number-input::-webkit-outer-spin-button,
.crochet-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.crochet-number-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Custom Number Input Controls */
.crochet-number-controls {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.crochet-number-btn {
    width: 20px;
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.crochet-number-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Range Slider */
.crochet-range-wrapper {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

.crochet-range-input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.crochet-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.crochet-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.crochet-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Pattern Information */
.crochet-pattern-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 1rem;
}

.crochet-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.crochet-info-item {
    text-align: center;
}

.crochet-info-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.2rem;
}

.crochet-info-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Export Section */
.crochet-export-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.crochet-export-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.crochet-export-grid {
    display: grid;
    gap: 0.8rem;
}

.crochet-export-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.crochet-export-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.crochet-export-btn:hover::before {
    left: 100%;
}

.crochet-export-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
}

.crochet-export-btn.secondary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.crochet-export-btn.success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.crochet-export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.crochet-export-btn:active {
    transform: translateY(0);
}

/* Export Options */
.crochet-export-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.crochet-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.crochet-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.crochet-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.crochet-checkbox:checked {
    background: white;
    border-color: white;
}

.crochet-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 12px;
    font-weight: bold;
}

/* Advanced Options */
.crochet-advanced-options {
    margin-top: 1rem;
}

.crochet-advanced-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.3s ease;
}

.crochet-advanced-toggle:hover {
    color: white;
}

.crochet-advanced-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.crochet-advanced-toggle.collapsed::after {
    transform: rotate(-90deg);
}

.crochet-advanced-content {
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.crochet-advanced-content.collapsed {
    max-height: 0;
}

/* Share Section */
.crochet-share-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.crochet-share-url {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.8rem;
    font-family: monospace;
    margin-bottom: 0.8rem;
}

.crochet-share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.crochet-share-btn {
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.crochet-share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Progress Indicator */
.crochet-progress {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.crochet-progress-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.crochet-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.crochet-progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .crochet-settings-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .crochet-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .crochet-export-grid {
        gap: 0.8rem;
    }

    .crochet-share-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .crochet-number-input {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }

    .crochet-export-btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .crochet-settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .crochet-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .crochet-export-grid {
        gap: 0.6rem;
    }

    .crochet-share-buttons {
        grid-template-columns: 1fr;
    }

    .crochet-number-input {
        font-size: 16px;
        padding: 0.8rem 1rem;
        min-height: 44px;
    }

    .crochet-export-btn {
        min-height: 44px;
        font-size: 16px;
        padding: 0.9rem 1.2rem;
    }

    .crochet-share-btn {
        min-height: 44px;
        font-size: 16px;
        padding: 0.8rem;
    }

    .crochet-checkbox {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .crochet-settings-section,
    .crochet-export-section,
    .crochet-share-section {
        padding: 1rem;
    }

    .crochet-export-btn {
        padding: 0.8rem;
        font-size: 15px;
        min-height: 44px;
    }

    .crochet-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .crochet-number-input {
        font-size: 16px;
        padding: 0.8rem 1rem;
        min-height: 44px;
    }

    .crochet-share-btn {
        min-height: 44px;
        font-size: 15px;
        padding: 0.8rem;
    }

    .crochet-checkbox {
        width: 20px;
        height: 20px;
    }

    .crochet-range-input {
        height: 8px;
    }

    .crochet-range-input::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }

    .crochet-range-input::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }

    .crochet-advanced-toggle {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }

    .crochet-input-label {
        font-size: 0.9rem;
    }
}