/**
 * MERAS Frontend Styles
 */

.meras-frontend-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Access Denied */
.meras-access-denied {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
}

.meras-access-denied .icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
}

.meras-access-denied h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #1e293b;
}

.meras-access-denied p {
    color: #64748b;
    margin-bottom: 20px;
}

.meras-btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: #0B5CFF;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.meras-btn-primary:hover {
    background: #0044cc;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(11,92,255,0.3);
}

.meras-btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.meras-btn-secondary:hover {
    background: #e2e8f0;
}

.meras-btn-success {
    display: inline-block;
    padding: 12px 28px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.meras-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Module Styles */
.meras-module-container {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.meras-module {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.meras-module .module-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.meras-module .module-icon {
    font-size: 32px;
}

.meras-module .module-header h2 {
    margin: 0;
    font-size: 22px;
    color: #1e293b;
}

.meras-module .module-status {
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

.meras-module .module-status.completed {
    color: #10b981;
}

.meras-module .module-description {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #0B5CFF;
    margin-bottom: 25px;
}

.meras-module .module-description p {
    margin: 0;
    color: #334155;
    line-height: 1.6;
}

/* Form Elements */
.meras-module .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.meras-module .form-group {
    margin-bottom: 20px;
}

.meras-module .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1e293b;
}

.meras-module .form-group .field-help {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.meras-module input[type="text"],
.meras-module input[type="email"],
.meras-module input[type="tel"],
.meras-module input[type="number"],
.meras-module input[type="date"],
.meras-module input[type="month"],
.meras-module select,
.meras-module textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.meras-module input:focus,
.meras-module select:focus,
.meras-module textarea:focus {
    outline: none;
    border-color: #0B5CFF;
    box-shadow: 0 0 0 3px rgba(11,92,255,0.1);
}

.meras-module textarea {
    resize: vertical;
    min-height: 80px;
}

.meras-module .btn-add-entry,
.meras-module .btn-add-cert,
.meras-module .btn-remove-entry,
.meras-module .btn-remove-cert {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.meras-module .btn-add-entry,
.meras-module .btn-add-cert {
    background: #dbeafe;
    color: #1e40af;
}

.meras-module .btn-add-entry:hover,
.meras-module .btn-add-cert:hover {
    background: #bfdbfe;
}

.meras-module .btn-remove-entry,
.meras-module .btn-remove-cert {
    background: #fee2e2;
    color: #991b1b;
}

.meras-module .btn-remove-entry:hover,
.meras-module .btn-remove-cert:hover {
    background: #fecaca;
}

/* Employment Entry */
.meras-module .employment-entry {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.meras-module .employment-entry h4 {
    margin: 0 0 15px;
    color: #003366;
}

.meras-module .cert-entry {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

/* Skill Ratings */
.meras-module .skill-category {
    margin-bottom: 25px;
}

.meras-module .skill-category h3 {
    color: #003366;
    margin: 0 0 15px;
    font-size: 16px;
}

.meras-module .skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.meras-module .skill-item {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.meras-module .skill-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 13px;
}

.meras-module .skill-rating {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meras-module .skill-rating input[type="radio"] {
    display: none;
}

.meras-module .skill-rating span {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.meras-module .skill-rating input[type="radio"]:checked + span {
    background: #0B5CFF;
    color: #fff;
}

.meras-module .skill-rating span:hover {
    background: #dbeafe;
}

/* Behavioural Questions */
.meras-module .behavioural-question {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.meras-module .behavioural-question .question-text {
    font-weight: 600;
    margin: 0 0 12px;
    color: #1e293b;
}

.meras-module .behavioural-question .question-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meras-module .behavioural-question .question-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.meras-module .behavioural-question .question-options input[type="radio"] {
    width: auto;
    margin: 0;
}

/* Workplace & Mobility Items */
.meras-module .workplace-grid,
.meras-module .mobility-grid,
.meras-module .credibility-grid,
.meras-module .risk-grid,
.meras-module .document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.meras-module .workplace-item,
.meras-module .mobility-item,
.meras-module .credibility-item,
.meras-module .risk-item,
.meras-module .document-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.meras-module .workplace-item label,
.meras-module .mobility-item label,
.meras-module .credibility-item label,
.meras-module .risk-item label,
.meras-module .document-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 13px;
}

.meras-module .yes-no,
.meras-module .status-options,
.meras-module .risk-level {
    display: flex;
    gap: 15px;
}

.meras-module .yes-no label,
.meras-module .status-options label,
.meras-module .risk-level label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 400;
    cursor: pointer;
}

.meras-module .yes-no input[type="radio"],
.meras-module .status-options input[type="radio"],
.meras-module .risk-level input[type="radio"] {
    width: auto;
    margin: 0;
}

/* Language Grid */
.meras-module .language-grid,
.meras-module .other-languages-grid,
.meras-module .digital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.meras-module .language-item,
.meras-module .digital-item {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.meras-module .language-item label,
.meras-module .digital-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 13px;
}

.meras-module .language-item select,
.meras-module .digital-item select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
}

/* Module Navigation */
.meras-module-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.meras-module-nav .module-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meras-module-nav .module-btn:hover {
    border-color: #0B5CFF;
}

.meras-module-nav .module-btn.active {
    border-color: #0B5CFF;
    background: #0B5CFF;
    color: #fff;
}

.meras-module-nav .module-btn.completed {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
}

.meras-module-nav .module-status {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
}

/* Progress Bar */
.meras-progress {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.meras-progress .progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.meras-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #003366, #0B5CFF);
    transition: width 0.5s ease;
}

.meras-progress .progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
}

/* Navigation Buttons */
.meras-nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .meras-module .form-row {
        grid-template-columns: 1fr;
    }
    
    .meras-module .skill-grid,
    .meras-module .language-grid,
    .meras-module .other-languages-grid,
    .meras-module .digital-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .meras-module .workplace-grid,
    .meras-module .mobility-grid,
    .meras-module .credibility-grid,
    .meras-module .risk-grid,
    .meras-module .document-grid {
        grid-template-columns: 1fr;
    }
    
    .meras-module .behavioural-question .question-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .meras-nav-buttons {
        flex-direction: column;
    }
    
    .meras-nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .meras-module .skill-grid,
    .meras-module .language-grid,
    .meras-module .other-languages-grid,
    .meras-module .digital-grid {
        grid-template-columns: 1fr;
    }
    
    .meras-module .module-header {
        flex-wrap: wrap;
    }
    
    .meras-module .module-status {
        margin-left: 0;
    }
}