/* Agreement Form Public Styles - Updated for PHP Forms */

.afhm-agreement-form-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Company Info */
.afhm-company-header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 2px solid #0073aa;
    margin-bottom: 30px;
}

.afhm-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.afhm-company-header h1 {
    margin: 0 0 20px 0;
    color: #1d2327;
    font-size: 36px !important;
}

.afhm-company-details {
    color: #50575e;
    line-height: 1.8;
    margin: 0 auto;
}

.step-title{
    text-align: center;
}

.afhm-form-row {
    
    gap: 16px; 
}

.afhm-form-group {
    flex: 1; /* দুটোই সমান width নেবে */
}

.display-none {
    display: none !important;
}

.afhm-company-details p {
    margin: 5px 0;
}

/* Welcome Message */
.afhm-welcome-message {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    padding: 20px;
    margin: 30px 0;
}

.afhm-welcome-message h2 {
    margin-top: 0;
    color: #0073aa;
}

/* Steps */
.afhm-step {
    min-height: 400px;
}

.afhm-step h2 {
    color: #1d2327;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Template Content */
.afhm-template-content {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    line-height: 1.8;
}

.afhm-template-content h2,
.afhm-template-content h3 {
    color: #1d2327;
    margin-top: 0;
}

.afhm-template-content ul {
    margin-left: 20px;
}

/* Form Fields */
.afhm-form-fields {
    margin: 30px 0;
}

.afhm-form-group {
    margin-bottom: 20px;
}

.afhm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
}

.afhm-form-group label .required {
    color: #d63638;
    margin-left: 4px;
}

.afhm-form-group input[type="text"],
.afhm-form-group input[type="email"],
.afhm-form-group input[type="tel"],
.afhm-form-group input[type="number"],
.afhm-form-group input[type="date"],
.afhm-form-group select,
.afhm-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.afhm-form-group input:focus,
.afhm-form-group select:focus,
.afhm-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.afhm-form-group .description {
    color: #646970;
    font-size: 13px;
    margin-top: 5px;
    font-style: italic;
}

/* Buttons */
.afhm-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
}

.afhm-button-primary {
    background: #0073aa;
    color: #fff !important;
}

.afhm-button-primary:hover {
    background: #005a87;
}

.afhm-button-success {
    background: #00a32a;
    color: #fff !important;
}

.afhm-button-success:hover {
    background: #008a20;
}

.afhm-button:not(.afhm-button-primary):not(.afhm-button-success) {
    background: #f0f0f1;
    color: #2c3338;
}

.afhm-button:not(.afhm-button-primary):not(.afhm-button-success):hover {
    background: #dcdcde;
}

.afhm-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.afhm-button-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.afhm-button-link:hover {
    text-decoration: underline;
}

/* Step Navigation */
.afhm-step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Progress Indicator */
.afhm-progress-indicator {
    margin: 0 0 30px 0;
}

.afhm-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.afhm-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #0073aa, #00a32a);
    transition: width 0.3s ease;
}

.afhm-progress-text {
    text-align: center;
    color: #50575e;
    font-size: 14px;
    font-weight: 600;
}

/* Review Content */
.afhm-review-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
}

.afhm-review-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 15px 0;
}

.afhm-review-section h3 {
    margin-top: 0;
    color: #1d2327;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.afhm-review-fields {
    margin: 15px 0;
}

.afhm-review-field {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.afhm-review-field:last-child {
    border-bottom: none;
}

.afhm-review-label {
    font-weight: 600;
    width: 40%;
    color: #1d2327;
}

.afhm-review-value {
    width: 60%;
    color: #50575e;
}

.afhm-review-edit {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.afhm-review-agreement {
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.afhm-checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    cursor: pointer;
}

.afhm-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
    width: auto;
    cursor: pointer;
}

/* Success Message */
.afhm-success-message {
    text-align: center;
    padding: 60px 20px;
}

.afhm-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: #00a32a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.afhm-success-message h2 {
    color: #00a32a;
    margin-bottom: 20px;
}

.afhm-success-message p {
    color: #50575e;
    font-size: 16px;
    line-height: 1.6;
}

/* Notice Messages */
.afhm-notice {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid;
    border-radius: 4px;
}

.afhm-notice.afhm-success {
    background: #edfaef;
    border-left-color: #00a32a;
    color: #1e4620;
}

.afhm-notice.afhm-error {
    background: #fce8e8;
    border-left-color: #d63638;
    color: #7c2d2d;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .afhm-agreement-form-wrapper {
        margin: 20px;
        padding: 15px;
    }
    
    .afhm-company-header h1 {
        font-size: 24px;
    }
    
    .afhm-step-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .afhm-button {
        width: 100%;
        text-align: center;
    }
    
    .afhm-review-field {
        flex-direction: column;
    }
    
    .afhm-review-label,
    .afhm-review-value {
        width: 100%;
    }
    
    .afhm-review-label {
        margin-bottom: 5px;
    }
}


.afhm-agreement-form-wrapper {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.afhm-company-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 20px;
    position: relative;
}

.afhm-manage-link {
    position: absolute;
    top: 0;
    right: 0;
}

.afhm-manage-link a {
    background: green;
    padding: 8px 20px;
    color: #fff;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 20px;
}

.afhm-company-header h1 {
    margin: 20px 0 10px 0;
    color: #2c3e50;
}

.afhm-company-header h4 {
    margin: 0;
    color: #6c757d;
}

.afhm-logo {
    max-width: 256px;
    height: auto;
}

.afhm-progress-indicator {
    margin-bottom: 30px;
}

.afhm-progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.afhm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    transition: width 0.3s ease;
}

.afhm-progress-text {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
}

.step-title {
    color: #2c3e50;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.afhm-form-row {
   
    margin-bottom: 20px;
}

.afhm-signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.afhm-form-section.form-section-representative {
    background: #f3f3f3;
    padding: 10px;
}

.afhm-button-clear {
    background: #0073aa;
}

.required { 
    color: #d63638; 
}

.afhm-form-group { 
    margin-bottom: 20px; 
}

.afhm-form-group label { 
    display: block; 
    font-weight: 600; 
    margin-bottom: 8px;
    color: #2c3e50;
}

.afhm-form-group input,
.afhm-form-group textarea,
.afhm-form-group select { 
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid #8c8f94; 
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.afhm-form-group input:focus,
.afhm-form-group textarea:focus,
.afhm-form-group select:focus { 
    outline: none; 
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.afhm-form-group input[readonly] {
    background: #f8f9fa;
    cursor: not-allowed;
}

.afhm-signature-section { 
    background: #f8f9fa; 
    padding: 25px; 
    border-radius: 6px; 
    margin-top: 30px;
    border: 1px solid #dee2e6;
}

.afhm-signature-section h3 { 
    margin-top: 0; 
    border-bottom: 2px solid #dee2e6; 
    padding-bottom: 10px;
    color: #2c3e50;
}

.afhm-step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.afhm-button {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    background: #6c757d;
    color: #fff;
}

.afhm-button:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.afhm-button-primary {
    background: #0073aa;
    color: #fff;
}

.afhm-button-primary:hover {
    background: #005a87;
}

.afhm-button-success {
    background: #28a745;
    color: #fff;
}

.afhm-button-success:hover {
    background: #218838;
}

.afhm-button-large {
    padding: 14px 35px;
    font-size: 16px;
}

.afhm-review-section { 
    background: #f8f9fa; 
    padding: 25px; 
    margin-bottom: 25px; 
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.afhm-review-section h3 { 
    margin-top: 0; 
    color: #2c3e50; 
    border-bottom: 2px solid #dee2e6; 
    padding-bottom: 10px; 
}

.afhm-review-field { 
    display: flex; 
    padding: 12px 0; 
    border-bottom: 1px solid #e9ecef; 
}

.afhm-review-field:last-child { 
    border-bottom: none; 
}

.afhm-review-label { 
    font-weight: 600; 
    width: 250px; 
    color: #495057; 
}

.afhm-review-value { 
    flex: 1; 
    color: #212529; 
}

.afhm-review-notice { 
    background: #fff3cd; 
    border: 1px solid #ffc107; 
    padding: 20px; 
    border-radius: 4px; 
    margin-bottom: 30px; 
}

.afhm-review-notice p { 
    margin: 0; 
    color: #856404;
    font-size: 15px;
}

.description {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #6c757d;
}

a.afhm_pdf_link {
    background: green;
    padding: 10px;
    color: #fff;
    text-decoration: none !important;
    font-weight: bold;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .afhm-agreement-form-wrapper {
        padding: 20px;
    }
    
    .afhm-form-row {
        grid-template-columns: 1fr;
    }
    
    .afhm-step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .afhm-button {
        width: 100%;
        text-align: center;
    }
    
    .afhm-review-field {
        flex-direction: column;
    }
    
    .afhm-review-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .afhm-signature-grid {
    display: block;
}

canvas {
    max-width: 100%;
}

}