/* ===========================================================================
   Federal Translation Portal — Frontend Styles
   Matches Federal Apostille website design
   =========================================================================== */

.ftp-portal-wrap {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* Header */
.ftp-portal-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f8a 100%);
    color: #fff;
    border-radius: 8px;
    padding: 35px 40px;
    text-align: center;
    margin-bottom: 30px;
}

.ftp-portal-header h2 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.ftp-portal-header p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* Sections */
.ftp-section {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.ftp-section:focus-within {
    border-color: #2c5f8a;
}

.ftp-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.ftp-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.ftp-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}

.ftp-section-body {
    padding: 25px;
}

/* Form Rows */
.ftp-row {
    margin-bottom: 18px;
}

.ftp-row:last-child {
    margin-bottom: 0;
}

.ftp-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .ftp-row-2col {
        grid-template-columns: 1fr;
    }
}

/* Fields */
.ftp-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1e3a5f;
    margin-bottom: 6px;
}

.ftp-required {
    color: #dc3545;
}

.ftp-field input[type="text"],
.ftp-field input[type="email"],
.ftp-field input[type="tel"],
.ftp-field input[type="number"],
.ftp-field select,
.ftp-field textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ftp-field input:focus,
.ftp-field select:focus,
.ftp-field textarea:focus {
    outline: none;
    border-color: #2c5f8a;
    box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.12);
}

.ftp-field input.ftp-error,
.ftp-field select.ftp-error,
.ftp-field textarea.ftp-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.ftp-help {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

/* Option Cards (Translation Type & Turnaround) */
.ftp-option-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .ftp-option-cards {
        grid-template-columns: 1fr;
    }
}

.ftp-option-card {
    display: block;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    position: relative;
}

.ftp-option-card:hover {
    border-color: #2c5f8a;
    background: #f8fbff;
}

.ftp-option-card-selected {
    border-color: #1e3a5f;
    background: #eef4fb;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.ftp-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ftp-option-card-inner strong {
    display: block;
    font-size: 15px;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.ftp-option-price {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #2c5f8a;
    margin-bottom: 8px;
}

.ftp-option-card-inner p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Checkbox (Notarization) */
.ftp-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.ftp-checkbox-label:hover {
    border-color: #2c5f8a;
    background: #f8fbff;
}

.ftp-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #1e3a5f;
}

.ftp-checkbox-label.ftp-checkbox-checked {
    border-color: #1e3a5f;
    background: #eef4fb;
}

.ftp-checkbox-text strong {
    color: #1e3a5f;
    font-size: 15px;
}

/* Upload Note */
.ftp-upload-note {
    background: #eef6ff;
    border: 1px solid #b8d4f0;
    border-radius: 6px;
    padding: 18px 20px;
}

.ftp-upload-note p {
    margin: 0;
    font-size: 14px;
    color: #1e3a5f;
    line-height: 1.6;
}

.ftp-upload-note a {
    color: #2c5f8a;
    font-weight: 600;
}

/* Order Summary */
.ftp-summary-section {
    border-color: #1e3a5f;
}

.ftp-summary {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 5px 0;
}

.ftp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.ftp-summary-row:last-child {
    border-bottom: none;
}

.ftp-summary-addon {
    color: #555;
}

.ftp-summary-total {
    background: #1e3a5f;
    color: #fff;
    border-radius: 0 0 6px 6px;
    font-size: 17px;
    padding: 15px 20px;
}

.ftp-summary-total strong {
    color: #fff;
}

/* Disclosures */
.ftp-disclosures {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 18px 25px;
    margin-bottom: 20px;
}

.ftp-disclosures p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #856404;
    font-size: 13px;
}

.ftp-disclosures ul {
    margin: 0;
    padding-left: 18px;
}

.ftp-disclosures li {
    font-size: 13px;
    color: #856404;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* Submit */
.ftp-submit-wrap {
    text-align: center;
    margin: 25px 0 10px;
}

.ftp-submit-btn {
    display: inline-block;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f8a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px 50px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.ftp-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

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

.ftp-submit-note {
    margin-top: 12px;
}

.ftp-submit-note p {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Form Messages */
.ftp-form-messages {
    margin-top: 15px;
    text-align: center;
}

.ftp-msg-error {
    color: #dc3545;
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 14px;
}

.ftp-msg-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 14px;
}

/* Success / Cancelled Return Pages */
.ftp-success-message {
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 30px auto;
}

.ftp-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 30px;
    margin-bottom: 15px;
}

.ftp-success-message h2 {
    color: #155724;
    margin: 0 0 10px;
}

.ftp-success-message p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.ftp-cancelled-message {
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 30px auto;
}

.ftp-cancelled-message h2 {
    color: #721c24;
}

.ftp-cancelled-message p {
    color: #555;
    font-size: 15px;
}

/* Payment Card Section */
.ftp-payment-section {
    border-color: #1e3a5f;
}

.ftp-card-container {
    min-height: 50px;
    padding: 12px;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s;
}

.ftp-card-container:focus-within {
    border-color: #2c5f8a;
    box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.12);
}

.ftp-card-errors {
    margin-top: 8px;
}

.ftp-card-errors .ftp-msg-error {
    text-align: left;
}

.ftp-payment-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.ftp-lock-icon {
    font-size: 15px;
}

/* File Upload */
.ftp-file-upload-area {
    margin-bottom: 5px;
}

.ftp-file-dropzone {
    border: 2px dashed #ccd0d4;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.ftp-file-dropzone:hover,
.ftp-dropzone-active {
    border-color: #2c5f8a;
    background: #f8fbff;
}

.ftp-file-dropzone.ftp-error {
    border-color: #dc3545;
    background: #fdf0f0;
}

.ftp-dropzone-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.ftp-file-dropzone p {
    margin: 0 0 4px;
    font-size: 14px;
    color: #555;
}

.ftp-file-dropzone p:last-child {
    margin-bottom: 0;
}

.ftp-file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ftp-file-list {
    margin-top: 10px;
}

.ftp-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.ftp-file-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.ftp-file-name {
    flex: 1;
    color: #333;
    font-weight: 500;
    word-break: break-all;
}

.ftp-file-size {
    color: #888;
    font-size: 12px;
    flex-shrink: 0;
}

.ftp-upload-progress {
    padding: 10px 12px;
    background: #eef6ff;
    border: 1px solid #b8d4f0;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #1e3a5f;
}

.ftp-upload-progress .ftp-spinner {
    border-color: rgba(30, 58, 95, 0.2);
    border-top-color: #1e3a5f;
    width: 14px;
    height: 14px;
}

.ftp-upload-success {
    padding: 10px 12px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #155724;
    font-weight: 600;
}

.ftp-upload-error {
    padding: 10px 12px;
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #dc3545;
}

/* Loading Spinner */
.ftp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ftp-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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