/*
    Registration Page - Modern Design
    Created on: Oct 29, 2025
    Bootstrap-free custom CSS
*/

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Page container */
.registration-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f7f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
}

/* Card container */
.registration-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    width: 100%;
    max-width: 500px;
}

/* Typography */
.registration-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.3;
}

.registration-subtitle {
    font-size: 16px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* OAuth Button */
.oauth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #ffffff;
    color: #0077b5;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 24px;
    cursor: pointer;
}

.oauth-button:hover {
    background-color: #f8f9fa;
    border-color: #0077b5;
}

.oauth-button:active {
    transform: scale(0.98);
}

.linkedin-button {
    color: #0077b5;
}

.linkedin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #0077b5;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: #e0e0e0;
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 16px;
    background-color: #ffffff;
    color: #6c757d;
    font-size: 14px;
    font-weight: 400;
}

/* Form styling */
.registration-form {
    width: 100%;
    border: none;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.registration-form td {
    border: none;
    background: transparent;
    padding: 0;
    vertical-align: middle;
}

.registration-form .tdLabel {
    padding-right: 12px;
    white-space: nowrap;
}

.registration-form .tdInput {
    width: 100%;
}

/* Label styling - targeting the actual Struts-generated labels */
.registration-form label,
.registration-form .label {
    font-size: 13px !important;
    font-weight: 500;
    color: #374151;
}

/* Legacy support for wwFormTable class if it exists */
.wwFormTable {
    width: 100%;
    border: none;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.wwFormTable td {
    padding: 0;
    border: none;
    background: transparent;
    vertical-align: middle;
}

.wwFormTable .tdLabel {
    padding-right: 12px;
    white-space: nowrap;
}

.wwFormTable .tdLabel label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

/* Required asterisk styling */
.required {
    color: #dc3545;
    font-size: 14px;
    margin-left: 4px;
}

/* Form inputs */
.form-input {
    width: 100%;
    height: 50px;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    color: #1a1a1a;
    background-color: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Inputs with icons */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    z-index: 1;
}

.input-with-icon-field {
    padding-left: 44px;
}

/* Handle Struts-generated table structure for inputs with icons */
.input-with-icon .wwFormTable {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 38px; /* Adjusted for label height */
    transform: none;
}

/* Select dropdown */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3e%3cpath d='M8 11L3 6h10l-5 5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Submit button */
.submit-button {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background-color: #0066cc;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-button:hover {
    background-color: #0052a3;
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* Terms text */
.terms-text {
    margin-top: 24px;
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    line-height: 1.6;
}

.terms-text a {
    color: #0066cc;
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Error messages */
.errorMessage,
.actionError {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.errors {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #842029;
}

.errors ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.errors li {
    margin: 4px 0;
    font-size: 14px;
}

/* Success messages */
.actionMessage {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #0f5132;
    font-size: 14px;
}

/* Loading state (optional) */
.submit-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 768px) {
    .registration-card {
        padding: 36px 24px;
        max-width: 100%;
        border-radius: 8px;
    }

    .registration-title {
        font-size: 24px;
    }

    .registration-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .oauth-button {
        height: 44px;
        font-size: 14px;
    }

    .form-input {
        height: 44px;
        font-size: 14px;
    }

    .submit-button {
        height: 44px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .registration-page {
        padding: 12px;
    }

    .registration-card {
        padding: 28px 20px;
    }

    .registration-title {
        font-size: 22px;
    }
}

/* Accessibility improvements */
.form-input:focus,
.submit-button:focus,
.oauth-button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .registration-page {
        background-color: #ffffff;
    }

    .registration-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .oauth-button,
    .submit-button {
        border: 1px solid #000;
    }
}
