/* ============================================
   TEXT-GENERATOR STYLES
   ============================================ */

/* ========== BASE ========== */
.text-generator {
    background: white;
    margin: 1rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.text-generator-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.text-generator-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.text-generator-header .header-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapse-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 0.25rem;
}

.text-generator.collapsed .collapse-btn {
    transform: rotate(-90deg);
}

.text-generator-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s;
}

.text-generator.collapsed .text-generator-body {
    display: none;
}

.text-generator-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

/* ========== INPUT GROUPS ========== */
.text-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.text-input-group label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gray-700);
    min-width: 90px;
}

.text-input-group input[type="text"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 180px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.text-input-group input[type="range"] {
    width: 120px;
    cursor: pointer;
}

#fontSizeValue {
    font-size: 0.8rem;
    color: var(--gray-500);
    min-width: 35px;
}

.text-input-wide {
    flex: 1;
    min-width: 250px;
}

.text-input-group textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    width: 100%;
    min-width: 200px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.text-input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========== SHAPE/LINE/WEIGHT BUTTONS ========== */
.shape-options,
.line-style-options,
.line-weight-options {
    display: flex;
    gap: 0.35rem;
}

.shape-btn,
.line-btn,
.weight-btn {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    color: var(--gray-600);
}

.shape-btn:hover,
.line-btn:hover,
.weight-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.shape-btn.active,
.line-btn.active,
.weight-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========== PREVIEW ========== */
.text-generator-preview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.preview-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.preview-box {
    min-width: 100px;
    min-height: 80px;
    width: auto;
    height: auto;
    max-width: 400px;
    max-height: 300px;
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    padding: 10px;
    overflow: auto;
}

.preview-box svg {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========== COLOR PICKER ========== */
.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker-wrap input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 32px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.color-picker-wrap input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrap input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-value {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* ========== ALIGN OPTIONS ========== */
.align-options {
    display: flex;
    gap: 0.35rem;
}

.align-btn {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    color: var(--gray-600);
}

.align-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* ========== ARROW OPTIONS ========== */
.arrow-options {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.arrow-btn {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.arrow-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

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

#arrowDetailsRow,
#arrowDetailsRow2 {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

#arrowDetailsRow .text-input-group {
    flex: 1;
    min-width: 120px;
}

/* ========== RANGE INPUTS ========== */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ========== NUMBER INPUTS ========== */
.num-input {
    width: 55px;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.num-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.num-input::-webkit-inner-spin-button,
.num-input::-webkit-outer-spin-button {
    opacity: 1;
}

.num-unit {
    font-size: 0.75rem;
    color: var(--gray-500);
    min-width: 20px;
}

/* ========== RESET BUTTON ========== */
.btn-reset {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-reset:hover {
    background: #dc2626;
}

/* ========== PADDING ROW ========== */
.padding-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.padding-group {
    flex: 1;
    min-width: 120px;
}

.padding-group label {
    font-size: 0.75rem;
    color: #6b7280;
}

.padding-group input[type="range"] {
    width: 100%;
}

/* ========== STANDALONE ARROW SECTION ========== */
.standalone-arrow-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #e5e7eb;
}

.standalone-arrow-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.standalone-arrow-section .section-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #374151;
}

.standalone-arrow-section .section-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

.standalone-arrow-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.standalone-arrow-preview {
    min-width: 150px;
    min-height: 60px;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.standalone-arrow-preview svg {
    max-width: 100%;
    max-height: 50px;
}

.standalone-arrow-content .preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
