/* User Interface Styles */

/* Login Section */
.login-section {
    flex: 1 0 auto;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    padding: 40px 0;
}

.login-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.login-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #1F2937;
}

/* Ensure header logo in user pages is compact and doesn't push header height */
.header .logo h1 {
    font-size: 28px;
    line-height: 1;
    margin: 0;
}

.login-header p {
    color: #6B7280;
    font-size: 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: #9CA3AF;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #F9FAFB;
}

.input-group input:focus {
    outline: none;
    border-color: #8B5CF6;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #8B5CF6;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #6B7280;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked~.checkmark {
    background: #8B5CF6;
    border-color: #8B5CF6;
}

.checkbox-container input:checked~.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #8B5CF6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #7C3AED;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E5E7EB;
}

.login-divider span {
    background: white;
    padding: 0 20px;
    color: #9CA3AF;
    font-size: 14px;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-social {
    width: 100%;
    padding: 15px;
    border: 2px solid #E5E7EB;
    background: white;
    color: #374151;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    border-color: #EA4335;
    color: #EA4335;
}

.btn-facebook:hover {
    border-color: #1877F2;
    color: #1877F2;
}

/* Login Footer */
.login-footer {
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}

.login-footer a {
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Demo Credentials */
.demo-credentials {
    margin-top: 40px;
}

.demo-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.demo-card h3 {
    color: #1F2937;
    margin-bottom: 15px;
    font-size: 20px;
}

.demo-card p {
    color: #6B7280;
    margin-bottom: 20px;
    font-size: 14px;
}

.demo-info {
    background: #F3F4F6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.demo-item {
    margin-bottom: 10px;
    font-size: 14px;
    color: #374151;
}

.demo-item:last-child {
    margin-bottom: 0;
}

.demo-item strong {
    color: #8B5CF6;
}

/* Register card narrow layout to match provided mock */
.register-card.narrow {
    max-width: 380px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.register-card.narrow h3 {
    font-size: 20px;
    color: #111827;
    margin-bottom: 4px;
    text-align: center;
}

.register-card.narrow label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-top: 10px;
    margin-bottom: 6px;
}

.register-card.narrow input[type="text"],
.register-card.narrow input[type="email"],
.register-card.narrow input[type="tel"],
.register-card.narrow input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #FBFDFF;
}

.name-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.name-col {
    flex: 1;
    min-width: 0;
    /* Prevents overflow/squishing issues in flex */
}

.name-col label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.optional-tag {
    color: #9CA3AF;
    font-size: 11px;
    font-weight: normal;
}

.firstNameCol,
.middleNameCol,
.lastNameCol {
    flex: 1;
}

.suffixCol {
    flex: 0 0 75px;
    /* Increased slightly for 'Suffix (Opt)' */
}

.field-note {
    color: #EF4444;
    font-size: 12px;
    margin-top: 6px;
    min-height: 16px;
}

.terms-row {
    margin-top: 12px;
}

.terms-row .checkbox-label {
    font-size: 13px;
    color: #6B7280;
}

.terms-row .checkbox-label input {
    margin-right: 8px;
}

@media (max-width: 768px) {

    /* Hide signup side text on tablets and smaller */
    .auth-hero {
        display: none !important;
    }

    .auth-grid {
        grid-template-columns: 1fr !important;
        justify-content: center;
    }

    .register-card.narrow {
        max-width: 100% !important;
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-section {
        padding: 30px 0;
        min-height: auto;
    }

    .login-container {
        margin: 20px auto;
        padding: 30px 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .demo-card {
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding: 20px 0;
    }

    .login-container {
        margin: 10px auto;
        padding: 20px 15px;
    }

    .register-card.narrow {
        margin: 10px auto;
        padding: 20px 15px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 15px;
    }

    .login-header h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .login-header p {
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .input-group input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .login-btn {
        margin-bottom: 20px;
    }

    /* Stack name fields vertically on very small screens */
    .name-row {
        flex-direction: column;
        gap: 0;
    }

    .name-col {
        width: 100%;
    }
}

/* Super small screens and short viewports */
@media (max-width: 360px),
(max-height: 600px) {
    .login-section {
        padding: 10px 0;
    }

    .login-container,
    .register-card.narrow {
        margin: 5px auto;
        padding: 15px 10px;
        border-radius: 12px;
    }

    .login-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 10px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-header h2 {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .login-header p {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .input-group input {
        padding: 10px 10px 10px 35px;
        font-size: 13px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .login-btn {
        margin-bottom: 15px;
    }

    .login-footer,
    .form-options {
        font-size: 12px;
    }

    .role-card {
        padding: 10px;
    }

    .role-card i {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .role-card span {
        font-size: 12px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Validation Styles */
.input-group input.error {
    border-color: #EF4444;
    background: #FEF2F2;
}

.input-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #EF4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.input-group input.error+.error-message {
    display: block;
}

/* Success State */
.input-group input.success {
    border-color: #10B981;
    background: #F0FDF4;
}

.input-group input.success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.notification-success {
    border-left-color: #27ae60;
}

.notification-error {
    border-left-color: #e74c3c;
}

.notification-warning {
    border-left-color: #f39c12;
}

.notification-info {
    border-left-color: #3498db;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-success .notification-content i {
    color: #27ae60;
}

.notification-error .notification-content i {
    color: #e74c3c;
}

.notification-warning .notification-content i {
    color: #f39c12;
}

.notification-info .notification-content i {
    color: #3498db;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: #f5f5f5;
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pet Modal Styles */
.pet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pet-modal.show {
    opacity: 1;
}

.pet-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pet-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pet-modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.pet-modal-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.pet-modal-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.pet-modal-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row.full-width {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
}

.detail-value {
    color: #333;
    text-align: right;
}

.detail-value.price {
    font-weight: 600;
    color: #8B5CF6;
    font-size: 1.1rem;
}

.detail-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.pet-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .pet-modal-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pet-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .pet-modal-footer {
        flex-direction: column;
    }

    .pet-modal-footer .btn {
        width: 100%;
    }
}

/* Role Selector Styles */
.role-group {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 5px;
    width: 100%;
}

.role-option {
    flex: 1;
    position: relative;
    min-width: 0;
}

.role-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-card i {
    font-size: 24px;
    color: #9CA3AF;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.role-card span {
    font-weight: 600;
    color: #6B7280;
    font-size: 14px;
    transition: color 0.3s ease;
}

.role-option input:checked+.role-card {
    background: #FaF5FF;
    border-color: #8B5CF6;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.15);
}

.role-option input:checked+.role-card i {
    color: #8B5CF6;
}

.role-option input:checked+.role-card span {
    color: #8B5CF6;
}

.role-option:hover .role-card {
    border-color: #D1D5DB;
    background: #FFFFFF;
}

.role-option input:checked:hover .role-card {
    border-color: #7C3AED;
}


/* Terms Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.close-modal {
    color: #9ca3af;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    color: #4b5563;
    line-height: 1.6;
}

.modal-body h4 {
    color: #1f2937;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: right;
    background-color: #f9fafb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Google Login Button Styles */
.google-btn {
    width: 100%;
    height: 42px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .15);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
    margin-top: 25px;
    margin-bottom: 15px;
    text-decoration: none;
}

.google-btn:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: #f8faff;
}

.google-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-icon {
    width: 18px;
    height: 18px;
}

.btn-text {
    color: #757575;
    font-size: 14px;
    letter-spacing: 0.2px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    padding-left: 8px;
}

/* Responsive adjustments for modal */
@media (max-width: 640px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}