/* =========================
 BASE STYLES
========================= */
.cvtt-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.cvtt-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.cvtt-header h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cvtt-header h2 .dashicons {
    color: #9b59b6;
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.cvtt-header .subtitle {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* =========================
 INPUT SECTIONS
========================= */
.cvtt-input-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .cvtt-input-container {
        grid-template-columns: 1fr;
    }
}

.input-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.input-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.input-section label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-section label .dashicons {
    color: #9b59b6;
}

.input-section .hint {
    font-size: 13px;
    font-weight: normal;
    color: #7f8c8d;
    margin-left: auto;
}

.input-section textarea {
    width: 100%;
    min-height: 250px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    background: #fdfdfd;
}

.input-section textarea:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 14px;
    color: #95a5a6;
    margin-top: 8px;
}

/* =========================
 OPTIONS
========================= */
.cvtt-options {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-group label {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group label .dashicons {
    color: #3498db;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.option-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    min-width: 150px;
}

.option-row .hint {
    font-size: 13px;
    color: #7f8c8d;
}

/* =========================
 BUTTONS
========================= */
.cvtt-generate-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cvtt-generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #8e44ad, #703688);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(155, 89, 182, 0.2);
}

.cvtt-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =========================
 LOADING STATE
========================= */
.cvtt-loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #9b59b6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cvtt-loading p {
    color: #2c3e50;
    margin: 10px 0;
}

.cvtt-loading .loading-details {
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

/* =========================
 ERROR MESSAGES
========================= */
.cvtt-error {
    background: #ffeaea;
    border-left: 4px solid #e74c3c;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c0392b;
}

/* =========================
 RESULTS SECTION
========================= */
.cvtt-results {
    animation: fadeIn 0.8s ease;
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h3 {
    color: #2c3e50;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cvtt-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.cvtt-summary p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
}

/* CV Cards */
.cvtt-cvs-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.cvtt-cv-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cvtt-cv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cvtt-cv-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cvtt-cv-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    flex: 1;
}

.cvtt-actions {
    display: flex;
    gap: 10px;
}

.cvtt-copy-btn,
.cvtt-download-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cvtt-copy-btn {
    background: #3498db;
    color: white;
}

.cvtt-copy-btn:hover:not(:disabled) {
    background: #2980b9;
}

.cvtt-download-btn {
    background: #27ae60;
    color: white;
}

.cvtt-download-btn:hover:not(:disabled) {
    background: #219653;
}

.cvtt-cv-content {
    padding: 25px;
    background: white;
    max-height: 600px;
    overflow-y: auto;
}

.cvtt-cv-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #34495e;
    background: #fdfdfd;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
}

/* =========================
 RESPONSIVE DESIGN
========================= */
@media (max-width: 768px) {
    .cvtt-wrapper {
        padding: 20px;
    }
    
    .cvtt-header h2 {
        font-size: 24px;
    }
    
    .input-section,
    .cvtt-options {
        padding: 20px;
    }
    
    .cvtt-cv-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cvtt-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .cvtt-cv-content pre {
        font-size: 13px;
        padding: 10px;
    }
}