/**
 * Agency Submission Form Styles
 *
 * @package    Bnd_Agency_Registry
 * @subpackage Bnd_Agency_Registry/public/css
 */

.bnd-agency-submission-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--bnd-padding-30);
}

.agency-submission-form-wrapper {
    background: #fff;
    border: var(--bnd-border-light-gray);
    border-radius: var(--bnd-border-radius-10);
    padding: var(--bnd-padding-30);
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--bnd-dark-color);
    margin-bottom: 10px;
}

.form-description {
    font-size: 16px;
    color: #666;
    margin-bottom: var(--bnd-padding-30);
}

.form-section {
    margin-bottom: var(--bnd-padding-30);
    padding-bottom: var(--bnd-padding-30);
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--bnd-dark-color);
    margin-bottom: var(--bnd-padding-20);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--bnd-padding-20);
}

.section-header .section-title {
    margin-bottom: 0;
}

.form-field {
    margin-bottom: var(--bnd-padding-20);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bnd-padding-20);
    margin-bottom: var(--bnd-padding-20);
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--bnd-dark-color);
    margin-bottom: 8px;
}

.form-field label.required::after {
    content: ' *';
    color: #d32f2f;
}

.file-info {
    font-weight: normal;
    font-size: 12px;
    color: #666;
    margin-left: 5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--bnd-padding-10);
    border: var(--bnd-border-light-gray);
    border-radius: var(--bnd-border-radius-5);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--bnd-primary-color);
    box-shadow: 0 0 0 2px rgba(8, 70, 170, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.custom-file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-file-label {
    display: inline-block;
    padding: var(--bnd-padding-10);
    border: var(--bnd-border-light-gray);
    border-radius: var(--bnd-border-radius-5);
    background-color: #fff;
    color: var(--bnd-dark-color);
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    transition: all 0.3s;
}

.custom-file-label:hover {
    border-color: var(--bnd-primary-color);
    background-color: #f8f9fa;
}

.file-label-text {
    display: inline-block;
}

.file-input:focus + .custom-file-label {
    outline: 2px solid var(--bnd-primary-color);
    outline-offset: 2px;
}

.file-preview {
    margin-top: 10px;
}

.file-preview img {
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: var(--bnd-border-radius-5);
    padding: 5px;
}

.checkbox-group {
    border: var(--bnd-border-light-gray);
    border-radius: var(--bnd-border-radius-5);
    padding: var(--bnd-padding-10);
    background: var(--bnd-light-color);
    max-height: 200px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--bnd-dark-color);
}

.checkbox-item:hover {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
    padding-left: 5px;
    padding-right: 5px;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--bnd-primary-color);
}

.checkbox-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.checkbox-item-custom {
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    padding-top: 12px;
}

.custom-category-field {
    display: none;
    padding: 0 10px 10px;
}

.custom-category-field .form-input {
    margin-top: 8px;
}

.subcategory-hint {
    padding: 0;
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 0;
}

.btn-add-service {
    padding: 10px 20px;
    background: var(--bnd-primary-color);
    color: #fff;
    border: none;
    border-radius: var(--bnd-border-radius-5);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-service:hover {
    background: var(--bnd-secondary-color);
}

.service-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: var(--bnd-border-radius-5);
    padding: var(--bnd-padding-20);
    margin-bottom: var(--bnd-padding-20);
    position: relative;
}

.service-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--bnd-padding-20);
}

.service-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--bnd-dark-color);
    margin: 0;
}

.btn-remove-service {
    padding: 5px 15px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: var(--bnd-border-radius-5);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-remove-service:hover {
    background: #b71c1c;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: var(--bnd-padding-30);
    padding-top: var(--bnd-padding-30);
    border-top: 1px solid #e0e0e0;
}

.btn-cancel,
.btn-submit {
    padding: 12px 30px;
    border: none;
    border-radius: var(--bnd-border-radius-5);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #f5f5f5;
    color: var(--bnd-dark-color);
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-submit {
    background: var(--bnd-primary-color);
    color: #fff;
}

.btn-submit:hover {
    background: var(--bnd-secondary-color);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-messages {
    margin-top: var(--bnd-padding-20);
}

.form-message {
    padding: 12px 15px;
    border-radius: var(--bnd-border-radius-5);
    margin-bottom: 10px;
    font-size: 14px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Addresses Section */
.addresses-group {
    margin-bottom: var(--bnd-padding-20);
}

.address-row {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.address-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.address-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: var(--bnd-padding-20);
    align-items: center;
    margin-bottom: 0;
}

.address-actions {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.btn-add-address {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--bnd-primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--bnd-border-radius-5);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.btn-add-address:hover {
    background-color: var(--bnd-secondary-color);
    box-shadow: 0 4px 12px rgba(8, 70, 170, 0.3);
}

.btn-add-address svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-remove-address {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    background-color: #d32f2f;
    color: #ffffff;
    border: none;
    border-radius: var(--bnd-border-radius-5);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
}

.btn-remove-address:hover {
    background-color: #b71c1c;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.btn-remove-address svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.form-info {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Field Error Highlighting */
.form-input.field-error,
.form-select.field-error,
.form-textarea.field-error {
    border-color: #d32f2f;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.checkbox-group.field-error {
    border-color: #d32f2f;
    border-width: 2px;
    background-color: #fff5f5;
}

.address-row.field-error {
    border-color: #d32f2f;
    border-width: 2px;
    background-color: #fff5f5;
    border-radius: var(--bnd-border-radius-5);
    padding: 12px;
}

.service-item.field-error {
    border-color: #d32f2f;
    border-width: 2px;
    background-color: #fff5f5;
}

/* Responsive */
@media (max-width: 768px) {
    .bnd-agency-submission-form-container {
        padding: var(--bnd-padding-20);
    }

    .agency-submission-form-wrapper {
        padding: var(--bnd-padding-20);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: var(--bnd-padding-20);
    }

    .form-field.full-width {
        grid-column: 1;
    }

    .address-fields {
        grid-template-columns: 1fr;
        gap: var(--bnd-padding-20);
    }

    .address-actions {
        justify-content: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

