/**
 * REDPRO Authentication Styles
 *
 * Styles for login and registration forms.
 */

/* ========================================
   Auth Forms - Minimal Container Styles
   ======================================== */

.prord-login-form,
.prord-register-form {
    /* No background, padding, borders, or shadows */
    /* Container styling controlled by page builder */
    width: 100%;
}

/* ========================================
   Form Groups
   ======================================== */

.prord-form-group {
    margin-bottom: 24px;
}

.prord-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--prord-color-text, #100F0C);
    font-size: 14px;
}

.prord-required {
    color: var(--prord-chat-error, #d63638);
}

.prord-field-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--prord-chat-text-muted, #666);
}

/* ========================================
   Input Fields
   ======================================== */

.prord-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--prord-chat-border, #e0e0e0);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.prord-input:focus {
    outline: none;
    border-color: var(--prord-color-accent, #104279);
    box-shadow: 0 0 0 3px rgba(16, 66, 121, 0.1);
}

.prord-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* ========================================
   Password Field
   ======================================== */

.prord-password-wrapper {
    position: relative;
}

.prord-password-wrapper .prord-input {
    padding-right: 48px;
}

.prord-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    padding: 8px !important;
    cursor: pointer;
    color: var(--prord-chat-text-muted, #666) !important;
    transition: color 0.2s;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
}

.prord-toggle-password:hover {
    color: var(--prord-color-accent, #104279) !important;
    background: none !important;
    border: none !important;
}

.prord-toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ========================================
   Password Strength Meter
   ======================================== */

.prord-password-strength-meter {
    margin-top: 12px;
}

.prord-strength-bar {
    height: 6px;
    background: var(--prord-chat-border, #e0e0e0);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.prord-strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
    border-radius: 3px;
}

.prord-strength-fill.weak {
    background: var(--prord-chat-error, #d63638);
    width: 33%;
}

.prord-strength-fill.medium {
    background: #f0b849;
    width: 66%;
}

.prord-strength-fill.strong {
    background: var(--prord-chat-success, #46b450);
    width: 100%;
}

.prord-strength-text {
    font-size: 13px;
    font-weight: 500;
}

.prord-strength-text.weak {
    color: var(--prord-chat-error, #d63638);
}

.prord-strength-text.medium {
    color: #f0b849;
}

.prord-strength-text.strong {
    color: var(--prord-chat-success, #46b450);
}

/* ========================================
   Password Requirements
   ======================================== */

.prord-password-requirements {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: none;
    /* Hidden by default */
    flex-wrap: wrap;
    gap: 8px;
}

.prord-password-requirements.show {
    display: flex;
    /* Show when user starts typing */
}

.prord-password-requirements li {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--prord-chat-text-muted, #666);
    background: var(--prord-chat-bg-alt, #f9f9f9);
    border-radius: 4px;
    border: 1px solid var(--prord-chat-border, #e0e0e0);
    opacity: 0.5;
    transition: all 0.3s;
}

.prord-password-requirements li .dashicons {
    display: none;
}

.prord-password-requirements li.valid {
    color: var(--prord-chat-success, #46b450);
    background: rgba(70, 180, 80, 0.1);
    border-color: var(--prord-chat-success, #46b450);
    opacity: 1;
    font-weight: 500;
}

/* ========================================
   Password Match Message
   ======================================== */

.prord-password-match-message {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.prord-password-match-message.match {
    color: var(--prord-chat-success, #46b450);
}

.prord-password-match-message.no-match {
    color: var(--prord-chat-error, #d63638);
}

/* ========================================
   Checkbox & Links
   ======================================== */

.prord-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.prord-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
    margin: 0;
}

.prord-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.prord-link {
    color: var(--prord-color-accent, #104279);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.prord-link:hover {
    color: var(--prord-color-primary, #182E52);
    text-decoration: underline;
}

/* ========================================
   Submit Button
   ======================================== */

.prord-submit-btn {
    width: 100% !important;
    padding: 14px 24px !important;
    background: var(--prord-color-accent, #104279) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    position: relative;
    text-align: center !important;
    display: block !important;
    line-height: 1.5 !important;
}

.prord-submit-btn:hover:not(:disabled) {
    background: var(--prord-color-primary, #182E52) !important;
    color: #fff !important;
    border: none !important;
}

.prord-submit-btn:focus:not(:disabled) {
    background: var(--prord-color-primary, #182E52) !important;
    outline: 2px solid #72C6CD !important;
    outline-offset: 2px !important;
    box-shadow: 0 4px 12px rgba(24, 46, 82, 0.3) !important;
    color: #fff !important;
    border: none !important;
}

.prord-submit-btn:disabled {
    background: var(--prord-chat-text-muted, #666) !important;
    cursor: not-allowed !important;
    color: #fff !important;
    border: none !important;
}

.prord-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.prord-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: prord-spin 0.6s linear infinite;
}

@keyframes prord-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Messages
   ======================================== */

.prord-auth-messages {
    margin-bottom: 20px;
}

.prord-auth-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prord-auth-message.success {
    background: rgba(70, 180, 80, 0.1);
    color: var(--prord-chat-success, #46b450);
    border: 1px solid var(--prord-chat-success, #46b450);
}

.prord-auth-message.error {
    background: rgba(214, 54, 56, 0.1);
    color: var(--prord-chat-error, #d63638);
    border: 1px solid var(--prord-chat-error, #d63638);
}

/* ========================================
   Form Footer
   ======================================== */

.prord-form-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--prord-chat-border, #e0e0e0);
    text-align: center;
}

.prord-form-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--prord-chat-text-muted, #666);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {

    .prord-login-form,
    .prord-register-form {
        padding: 24px;
    }

    .prord-form-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   Business Toggle Switch
   ======================================== */

.prord-business-toggle-wrapper {
    margin: 20px 0;
}

.prord-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: normal;
}

.prord-toggle-text {
    font-size: 14px;
    color: var(--prord-color-text, #100F0C);
    font-weight: 500;
}

.prord-toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 7px;
}

.prord-business-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.prord-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--prord-chat-border, #e0e0e0);
    transition: 0.3s;
    border-radius: 26px;
}

.prord-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prord-business-toggle-input:checked+.prord-toggle-slider {
    background-color: var(--prord-color-accent, #104279);
}

.prord-business-toggle-input:checked+.prord-toggle-slider:before {
    transform: translateX(24px);
}

.prord-business-toggle-input:disabled+.prord-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.prord-toggle-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
}

.prord-toggle-loading {
    color: var(--prord-chat-text-muted, #666);
}

.prord-toggle-success {
    color: var(--prord-chat-success, #46b450);
}

.prord-toggle-error {
    color: var(--prord-chat-error, #d63638);
}

/* ========================================
   Company Profile Form
   ======================================== */

.prord-company-profile-wrapper {
    margin: 0 auto;
}

.prord-profile-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--prord-color-text, #100F0C);
    margin-bottom: 30px;
    text-align: center;
}

.prord-company-profile-form {
    width: 100%;
}

.prord-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--prord-chat-border, #e0e0e0);
}

.prord-form-section:last-of-type {
    border-bottom: none;
}

.prord-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--prord-color-primary, #182E52);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--prord-color-accent, #104279);
}

.prord-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* NIT Validation */
.prord-nit-validation {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
}

.prord-validation-success {
    color: var(--prord-chat-success, #46b450);
}

.prord-validation-error {
    color: var(--prord-chat-error, #d63638);
}

.prord-input-success {
    border-color: var(--prord-chat-success, #46b450) !important;
}

.prord-input-error {
    border-color: var(--prord-chat-error, #d63638) !important;
}

/* Profile Toggle (reuse business toggle styles) */
.prord-profile-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.prord-profile-toggle-input+.prord-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--prord-chat-border, #e0e0e0);
    transition: 0.3s;
    border-radius: 26px;
}

.prord-profile-toggle-input+.prord-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prord-profile-toggle-input:checked+.prord-toggle-slider {
    background-color: var(--prord-color-accent, #104279);
}

.prord-profile-toggle-input:checked+.prord-toggle-slider:before {
    transform: translateX(24px);
}

.prord-profile-toggle-input:disabled+.prord-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .prord-company-profile-wrapper {
        padding: 0 15px;
    }

    .prord-profile-title {
        font-size: 20px;
    }

    .prord-section-title {
        font-size: 16px;
    }
}

/* ========================================
   List Card Styles
   ======================================== */

.prord-experiences-list-wrapper,
.prord-financial-info-list-wrapper {
    width: 100%;
}

.prord-empty-list {
    text-align: center;
    padding: 40px 20px;
    color: var(--prord-chat-text-muted, #666);
    font-size: 16px;
}

.prord-list-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.prord-list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}


.prord-card-content {
    flex: 1;
}

.prord-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--prord-color-text, #100F0C);
    margin-bottom: 4px;
}

.prord-card-meta {
    font-size: 13px;
    color: var(--prord-chat-text-muted, #666);
}

.prord-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Action Buttons */
.prord-action-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--prord-chat-text-muted, #666);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.prord-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.prord-view-btn:hover,
.prord-view-link:hover {
    color: var(--prord-color-primary, #100F0C);
}

.prord-edit-btn:hover {
    color: #0073aa;
}

.prord-delete-btn:hover {
    color: var(--prord-chat-error, #d63638);
}

.prord-action-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* View link (anchor tag) should look like button */
.prord-view-link {
    text-decoration: none;
}

/* ========================================
   Delete Confirmation Modal
   ======================================== */

.prord-delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.prord-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.prord-modal-content {
    position: relative;
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000000;
}

.prord-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: var(--prord-color-text, #100F0C);
}

.prord-modal-content p {
    margin: 0 0 25px 0;
    color: var(--prord-chat-text-muted, #666);
    line-height: 1.6;
}

.prord-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.prord-modal-cancel,
.prord-modal-confirm {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.prord-modal-cancel {
    background: #f0f0f0;
    color: var(--prord-color-text, #100F0C);
}

.prord-modal-cancel:hover {
    background: #e0e0e0;
}

.prord-modal-confirm {
    background: var(--prord-chat-error, #d63638);
    color: #fff;
}

.prord-modal-confirm:hover {
    background: #c62828;
}

.prord-modal-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.prord-modal-open {
    overflow: hidden;
}

/* ========================================
   Edit Modal Styles
   ======================================== */

.prord-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.prord-modal-large {
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.prord-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none !important;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer !important;
    color: var(--prord-chat-text-muted, #666) !important;
    transition: color 0.2s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prord-modal-close:hover {
    color: var(--prord-color-text, #100F0C) !important;
    background: none !important;
}

.prord-modal-body {
    margin-top: 10px;
}

.prord-edit-form .prord-form-group {
    margin-bottom: 20px;
}

.prord-edit-form .prord-submit-btn {
    width: 100%;
    margin-top: 10px;
}

/* Scrollbar for modal */
.prord-modal-large::-webkit-scrollbar {
    width: 8px;
}

.prord-modal-large::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.prord-modal-large::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.prord-modal-large::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .prord-modal-large {
        max-width: 90%;
        max-height: 90vh;
    }

    .prord-modal-close {
        top: 15px;
        right: 15px;
    }
}

/* ========================================
   File Upload Field
   ======================================== */

.prord-file-upload-wrapper {
    position: relative;
}

.prord-file-input {
    position: absolute;
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
    z-index: -1;
}

.prord-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px dashed var(--prord-color-gray, #e0e0e0);
    border-radius: 8px;
    background: var(--prord-color-bg-light, #f8f8f9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.prord-file-info:hover {
    border-color: var(--prord-color-primary, #182E52);
    background: #fff;
}

.prord-file-icon {
    font-size: 24px;
}

.prord-file-text {
    font-size: 14px;
    color: var(--prord-chat-text-muted, #666);
}

.prord-file-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--prord-color-primary, #182E52);
    border-radius: 8px;
    background: #fff;
}

.prord-file-name {
    font-size: 14px;
    color: var(--prord-color-text, #100F0C);
    font-weight: 500;
}

.prord-file-remove {
    background: var(--prord-chat-error, #d63638) !important;
    color: #fff !important;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s ease !important;
}

.prord-file-remove:hover {
    background: #b32d2e !important;
}

.prord-field-description {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--prord-chat-text-muted, #666);
}

/* ========================================
   Load More Button
   ======================================== */

.prord-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-top: 16px;
}

.prord-load-more-btn {
    padding: 12px 32px !important;
    background: var(--prord-color-accent, #104279) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 160px;
}

.prord-load-more-btn:hover:not(:disabled) {
    background: var(--prord-color-primary, #182E52) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 66, 121, 0.3);
}

.prord-load-more-btn:disabled {
    background: var(--prord-chat-text-muted, #666) !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.prord-load-more-btn .prord-btn-text,
.prord-load-more-btn .prord-btn-loader {
    display: inline-block;
}