/* Citizens Advice Redbridge - Client Portal Styles */

/* ===== BASE STYLES ===== */
body {
    font-family: 'Open Sans', sans-serif;
    color: #161616;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #F9F9F9;
    font-size: 18px;
}

/* ===== HEADINGS ===== */
h1 {
    background-color: #005EA5;
    color: #FFFFFF;
    padding: 20px 0;
    text-align: center;
    margin: 0;
    font-size: 24px;
}

h2 {
    background-color: #005EA5;
    color: #FFFFFF;
    padding: 15px 20px;
    margin: 30px 0 0 0;
    font-size: 20px;
}

h3 {
    color: #005EA5;
    margin-top: 0;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 900px;
    margin: 20px auto;
    background-color: #FFFFFF;
    padding: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.intro {
    background-color: #F7F7F7;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #005EA5;
}

/* ===== FORM ELEMENTS ===== */
fieldset {
    border: 1px solid #CCCCCC;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #F7F7F7;
}

legend {
    color: #005EA5;
    font-weight: bold;
    font-size: 18px;
    padding: 0 10px;
}

label {
    display: block;
    margin: 15px 0;
    font-size: 18px;
}

/* ===== INPUT STYLES ===== */
input[type="radio"], 
input[type="checkbox"] {
    transform: scale(2);
    margin-right: 15px;
    accent-color: #005EA5;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    font-family: 'Open Sans', sans-serif;
    border: 1px solid #CCCCCC;
    box-sizing: border-box;
    font-size: 18px;
}

select {
    cursor: pointer;
    background-color: #f8f8f8;
}

textarea {
    resize: vertical;
}

small {
    font-size: 14px;
    color: #666;
}

/* ===== BUTTONS ===== */
input[type="submit"] {
    background-color: #00703C;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 15px 40px;
    display: block;
    margin: 30px auto;
    width: 100%;
}

input[type="submit"]:hover {
    background-color: #005C2C;
}

button[type="button"] {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 3px;
    margin-top: 10px;
}

button[type="button"]:hover {
    background-color: #0056b3;
}

/* ===== NOTIFICATIONS ===== */
.emergency-warning {
    background-color: #FEF7F7;
    border: 2px solid #D4351C;
    padding: 20px;
    margin: 20px 0;
    display: none;
}

.emergency-warning h3 {
    color: #D4351C;
    margin-top: 0;
}

.emergency-info {
    background-color: #FFF;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #D4351C;
}

.success-message {
    background-color: #00703C;
    color: white;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    display: none;
}

.success-message h2 {
    margin-top: 0;
    background: none;
    padding: 0;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;
}

.strength-weak { 
    color: #D4351C; 
}

.strength-medium { 
    color: #F47738; 
}

.strength-strong { 
    color: #00703C; 
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    background-color: #E8E8E8;
    height: 10px;
    border-radius: 5px;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-fill {
    background-color: #00703C;
    height: 100%;
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s;
}

/* ===== DYNAMIC ENTRIES (Children, Benefits) ===== */
.child-entry, 
.benefit-entry {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.child-entry label, 
.benefit-entry label {
    display: inline-block;
    margin-right: 10px;
}

.child-entry input, 
.benefit-entry input,
.benefit-entry select {
    width: auto;
    display: inline-block;
    margin-right: 10px;
}

button.deleteChild, 
button.deleteBenefit {
    background-color: #dc3545;
    padding: 5px 10px;
    font-size: 14px;
}

button.deleteChild:hover, 
button.deleteBenefit:hover {
    background-color: #c82333;
}

/* ===== DEBT AMOUNT FIELDS ===== */
.debt-amount-field {
    margin-top: 10px;
    margin-left: 40px;
    padding: 10px;
    background-color: #fff;
    border-left: 3px solid #005EA5;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none;
}

.required-field {
    color: #D4351C;
    font-weight: bold;
}

.loading {
    color: #005EA5;
    font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    h1 {
        font-size: 20px;
        padding: 15px 10px;
    }

    h2 {
        font-size: 18px;
        padding: 12px 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px;
    }

    label {
        font-size: 16px;
    }

    input[type="radio"], 
    input[type="checkbox"] {
        transform: scale(1.5);
        margin-right: 10px;
    }
}

/* ===== MESSAGING STYLES ===== */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-item {
    padding: 12px 15px;
    border-radius: 5px;
    word-wrap: break-word;
    max-width: 85%;
}

.message-sent {
    background-color: #005EA5;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.message-received {
    background-color: #E7E7E7;
    color: #161616;
    align-self: flex-start;
}

.message-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.message-sender {
    font-weight: bold;
    margin-right: 10px;
}

.message-time {
    font-size: 11px;
}

.message-content {
    word-break: break-word;
    line-height: 1.4;
}
