/* =========================
 BASE STYLES
========================= */
.sna-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);
}

.sna-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.sna-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}

.sna-header .subtitle {
    color: #7f8c8d;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================
 SECTIONS
========================= */
.sna-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.sna-section h3 {
    color: #3498db;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sna-section h3 .dashicons {
    color: #3498db;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: -15px;
    margin-bottom: 20px;
}

/* =========================
 FORM STYLES
========================= */
.sna-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.salary-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.salary-input-group input[type="number"] {
    flex: 1;
}

.salary-input-group select {
    width: 120px;
}

.currency-display {
    min-width: 40px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.field-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

/* =========================
 TEXTAREA SECTIONS
========================= */
.sna-input-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .sna-input-container {
        grid-template-columns: 1fr;
    }
}

.input-section {
    margin-bottom: 15px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.input-section textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* =========================
 ACTION BUTTONS
========================= */
.sna-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.sna-generate-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.sna-generate-btn:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.sna-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sna-clear-btn {
    background: #f8f9fa;
    color: #e74c3c;
    border: 1px solid #eaeaea;
    padding: 15px 25px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.sna-clear-btn:hover {
    background: #fff5f5;
    border-color: #e74c3c;
}

/* =========================
 LOADING STATE
========================= */
.sna-loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#sna_loading_message {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.loading-details {
    color: #7f8c8d;
    font-size: 14px;
}

/* =========================
 ERROR MESSAGE
========================= */
.sna-error {
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.error-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.error-content .dashicons {
    color: #e74c3c;
    margin-top: 2px;
}

.error-text {
    flex: 1;
}

/* =========================
 RESULTS SECTION
========================= */
.sna-results {
    margin-top: 30px;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.results-header h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
}

.results-header p {
    color: #7f8c8d;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
}

/* Coach Introduction */
.sna-coach-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.coach-avatar .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: white;
}

.coach-greeting h4 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: white;
}

.coach-greeting p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Offer Summary */
.sna-summary-section {
    margin-bottom: 30px;
}

.sna-offer-summary {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.salary-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.salary-item {
    text-align: center;
    padding: 15px 25px;
    border-radius: 6px;
    min-width: 150px;
}

.salary-item.offered {
    background: #ffeaa7;
    border: 2px solid #fdcb6e;
}

.salary-item.target {
    background: #a3e4d7;
    border: 2px solid #76d7c4;
}

.salary-label {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.salary-amount {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.salary-arrow {
    font-size: 24px;
    color: #3498db;
    font-weight: bold;
}

.salary-gap {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #3498db;
}

.gap-label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.gap-amount {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
}

.gap-percentage {
    display: block;
    font-size: 14px;
    color: #27ae60;
}

.walkaway-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff5f5;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #e74c3c;
}

.walkaway-notice .dashicons {
    color: #e74c3c;
}

/* Strategy Sections */
.sna-strategy-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    transition: transform 0.3s;
}

.sna-strategy-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h4 {
    color: #2c3e50;
    font-size: 18px;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header .section-intro {
    color: #3498db;
    font-style: italic;
    margin: 0;
    font-size: 14px;
}

.section-content {
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
}

.section-content p {
    margin-bottom: 15px;
}

.section-content ul,
.section-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.section-content li {
    margin-bottom: 8px;
}

/* Specific section types */
.sna-analysis-section {
    border-left: 4px solid #3498db;
}

.sna-leverage-section {
    border-left: 4px solid #9b59b6;
}

.sna-strategy-section {
    border-left: 4px solid #2ecc71;
}

.sna-words-section {
    border-left: 4px solid #f39c12;
}

.sna-presentation-section {
    border-left: 4px solid #1abc9c;
}

.sna-responses-section {
    border-left: 4px solid #e74c3c;
}

.sna-action-section {
    border-left: 4px solid #34495e;
}

/* Script styling */
.sna-script {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
}

.sna-script pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: #2c3e50;
}

/* Leverage points */
.leverage-list ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.leverage-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.leverage-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Encouragement section */
.sna-encouragement {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.encouragement-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #2c3e50;
}

.encouragement-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 20px;
}

.encouragement-content p {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.6;
}

.coach-signature {
    font-style: italic;
    color: #7f8c8d;
    text-align: right;
    margin-top: 15px !important;
}

/* Tips section */
.sna-tips-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid #eaeaea;
}

.sna-tips-section h4 {
    color: #2c3e50;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tip-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.tip-item .dashicons {
    color: #3498db;
    font-size: 24px;
    margin-bottom: 10px;
}

.tip-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.tip-item p {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* =========================
 SPINNER ANIMATION
========================= */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* =========================
 RESPONSIVE DESIGN
========================= */
@media (max-width: 768px) {
    .sna-wrapper {
        padding: 15px;
    }
    
    .sna-header h2 {
        font-size: 24px;
    }
    
    .salary-comparison {
        flex-direction: column;
        gap: 15px;
    }
    
    .salary-item {
        width: 100%;
        max-width: 250px;
    }
    
    .sna-actions {
        flex-direction: column;
    }
    
    .sna-coach-intro {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}