/**
 * SWA Family Applications Styles
 */

/* Applicants Container */
.swa-applicants-container {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.swa-applicants-container h3 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Family Discount Notice */
.swa-family-discount-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e8f5f1 0%, #d4edda 100%);
    border-radius: 12px;
    margin-bottom: 24px;
    border-right: 4px solid #16a085;
}

[dir="ltr"] .swa-family-discount-notice {
    border-right: none;
    border-left: 4px solid #16a085;
}

.swa-family-discount-notice .dashicons {
    color: #16a085;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.swa-family-discount-notice p {
    margin: 0;
    font-size: 14px;
    color: #155724;
    line-height: 1.5;
}

.swa-family-discount-notice strong {
    display: block;
    margin-top: 4px;
    color: #16a085;
}

/* Applicant Card */
.swa-applicant-card {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.swa-applicant-card:hover {
    border-color: #e0e0e0;
}

.swa-applicant-card[data-index="0"] {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-color: #2196f3;
}

/* Applicant Header */
.swa-applicant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.swa-applicant-number {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a2e;
}

.swa-remove-applicant {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swa-remove-applicant:hover {
    background: #fee;
}

.swa-remove-applicant .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Applicant Fields */
.swa-applicant-fields {
    padding: 20px;
}

.swa-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.swa-field-row:last-child {
    margin-bottom: 0;
}

.swa-field-col {
    flex: 1;
}

.swa-field-col label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.swa-field-col input,
.swa-field-col select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.swa-field-col input:focus,
.swa-field-col select:focus {
    border-color: #16a085;
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.swa-field-col input.swa-error,
.swa-field-col select.swa-error {
    border-color: #e74c3c;
    background: #fff5f5;
}

/* Applicants Actions */
.swa-applicants-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#swa-add-applicant {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#swa-add-applicant .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

#swa-add-applicant.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.swa-applicants-count {
    font-size: 14px;
    color: #666;
}

/* Applicants Total */
.swa-applicants-total {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 24px;
}

.swa-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.swa-total-row.swa-discount-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.swa-discount-value {
    color: #2ecc71 !important;
}

.swa-total-row.swa-grand-total {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.swa-grand-total .swa-total-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.swa-grand-total .swa-total-value {
    font-size: 24px;
    font-weight: 700;
    color: #1abc9c;
}

/* Price Summary */
.swa-price-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.swa-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.swa-price-row:last-child {
    border-bottom: none;
}

.swa-price-row.swa-discount {
    color: #16a085;
}

.swa-price-row.swa-total {
    font-weight: 600;
    font-size: 18px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid #ddd;
}

/* Messages */
.swa-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.swa-message-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.swa-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Responsive */
@media (max-width: 768px) {
    .swa-applicants-container {
        padding: 20px;
    }

    .swa-field-row {
        flex-direction: column;
        gap: 12px;
    }

    .swa-applicants-actions {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    #swa-add-applicant {
        width: 100%;
        justify-content: center;
    }
}

