/* ===================================
   Cargo Terminal Survey - Frontend Styles
   Modern, Professional Design
   =================================== */

.cts-survey-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.cts-survey-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cts-survey-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cts-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
}

.cts-form {
    background: white;
}

.cts-form-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.cts-form-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.cts-operator-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid #667eea;
}

.cts-section-title {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    letter-spacing: -0.3px;
}

.cts-label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 15px;
}

.required {
    color: #e53e3e;
    font-weight: bold;
}

.cts-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.cts-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cts-table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cts-questions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.cts-questions-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cts-questions-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.question-col {
    width: 50%;
}

.rating-col {
    width: 25%;
    text-align: center !important;
}

.cts-questions-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.cts-questions-table tbody tr:hover {
    background-color: #f7fafc;
}

.cts-questions-table tbody tr:last-child {
    border-bottom: none;
}

.question-text {
    padding: 20px;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.6;
}

.rating-cell {
    padding: 20px;
    text-align: center;
}

.cts-rating-select {
    width: 120px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cts-rating-select:hover {
    border-color: #cbd5e0;
}

.cts-rating-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.na-text {
    display: inline-block;
    padding: 8px 16px;
    background: #edf2f7;
    color: #718096;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.cts-form-group {
    margin-bottom: 25px;
}

.cts-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.cts-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.word-count {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #718096;
    text-align: right;
}

#word-count-display.over-limit {
    color: #e53e3e;
    font-weight: bold;
}

.cts-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cts-checkbox-label {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cts-checkbox-label:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.cts-checkbox-label input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cts-checkbox-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

.cts-checkbox-label span {
    font-size: 15px;
    color: #2d3748;
}

.cts-form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.cts-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    letter-spacing: 0.5px;
}

.cts-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.cts-submit-btn:active {
    transform: translateY(0);
}

.cts-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cts-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.cts-message.success {
    background: #c6f6d5;
    color: #2f855a;
    border: 2px solid #9ae6b4;
}

.cts-message.error {
    background: #fed7d7;
    color: #c53030;
    border: 2px solid #fc8181;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cts-survey-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .cts-survey-header {
        padding: 30px 15px;
    }
    
    .cts-survey-header h1 {
        font-size: 24px;
    }
    
    .cts-form-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .cts-section-title {
        font-size: 18px;
    }
    
    .cts-questions-table th,
    .question-text,
    .rating-cell {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .cts-rating-select {
        width: 100%;
    }
    
    .question-col {
        width: 40%;
    }
    
    .rating-col {
        width: 30%;
    }
}

@media (max-width: 480px) {
    .cts-table-container {
        font-size: 12px;
    }
    
    .cts-rating-select {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .cts-submit-btn {
        width: 100%;
        padding: 14px 24px;
    }
}
