/* Reset specific for signup page to work with header */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background:
        linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
        url("/static/images/background_wallpapers/signup_bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    margin-top: 10px; /* Reduced from 20px */
}

.signup-container {
    width: 100%;
    max-width: 1100px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 10px; /* Reduced from 20px */
}

.signup-wrapper {
    display: flex;
    min-height: 650px; /* Reduced from 700px */
}

/* Left Side Styles */
.left-side {
    flex: 1;
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 50px 35px; /* Reduced padding */
    display: flex;
    flex-direction: column;
}

.logo1 {
    font-size: 26px; /* Reduced from 28px */
    font-weight: 700;
    margin-bottom: 30px; /* Reduced from 40px */
}

.logo1 span {
    color: #4dabf7;
}

.left-side h1 {
    font-size: 28px; /* Reduced from 32px */
    line-height: 1.35; /* Adjusted line-height */
    margin-bottom: 40px; /* Reduced from 50px */
    font-weight: 600;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Reduced from 20px */
    margin-bottom: 30px; /* Reduced from 40px */
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    line-height: 1.5;
    padding: 6px 0;
}

.feature-item i {
    background: #4dabf7;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.divider-line {
    height: 1px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Improve feature checklist styling */

.features-list {
    gap: 12px;   /* reduce vertical spacing */
}

.feature-item {
    font-size: 15px;
    gap: 10px;
    line-height: 1.4;
}

.feature-item i {
    font-size: 16px;
    min-width: 18px;
}

/* Right Side Styles */
.right-side {
    flex: 1;
    padding: 50px 45px; /* Reduced from 60px 50px */
    display: flex;
    flex-direction: column;
}

.right-side h2 {
    font-size: 28px; /* Reduced from 32px */
    color: #2c3e50;
    margin-bottom: 8px; /* Reduced from 10px */
}

.form-subtitle {
    color: #6c757d;
    font-size: 15px; /* Reduced from 16px */
    margin-bottom: 30px; /* Reduced from 40px */
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 18px; /* Added consistent gap between form groups */
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px; /* Small bottom margin */
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px; /* Reduced from 8px */
    font-size: 14px; /* Reduced from 15px */
}

.form-group input {
    padding: 13px 18px; /* Reduced from 15px 20px */
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px; /* Reduced from 16px */
    transition: all 0.3s ease;
    outline: none;
    height: 48px; /* Fixed height for consistency */
}

.form-group input:focus {
    border-color: #4dabf7;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

.form-group input.error {
    border-color: #fa5252;
}

.form-group input.success {
    border-color: #51cf66;
}

.error-message {
    color: #fa5252;
    font-size: 13px; /* Reduced from 14px */
    margin-top: 4px; /* Reduced from 5px */
    min-height: 18px; /* Reduced from 20px */
    line-height: 1.3;
}

/* Phone Input Styles */
.phone-input-group {
    display: flex;
    width: 100%;
    gap: 8px; /* Added gap between select and input */
}

.country-code-selector {
    position: relative;
    width: 130px; /* Reduced from 140px */
}

.country-code-selector select {
    width: 100%;
    padding: 13px 18px; /* Reduced from 15px 20px */
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px; /* Reduced from 16px */
    appearance: none;
    background-color: white;
    outline: none;
    cursor: pointer;
    height: 48px; /* Fixed height to match inputs */
}

.country-code-selector i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 14px;
}

.phone-input-group input {
    flex: 1;
}

/* Password Input Styles */
.password-input-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 200px; /* Adjusted position */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px; /* Reduced from 18px */
    padding: 10px; /* Reduced from 20px */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Register Button */
.register-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 16px; /* Reduced from 18px */
    border-radius: 8px;
    font-size: 16px; /* Reduced from 18px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Reduced from 10px */
    margin-top: 8px; /* Reduced from 10px */
    height: 50px; /* Fixed height */
}

.register-btn:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.register-btn:active {
    transform: translateY(0);
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 20px; /* Reduced from 25px */
    color: #6c757d;
    font-size: 15px; /* Reduced from 16px */
}

.login-link a {
    color: #4dabf7;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Django Messages */
.django-messages {
    margin: 12px 0; /* Reduced from 15px 0 */
}

.message {
    padding: 10px 16px; /* Reduced from 12px 20px */
    border-radius: 8px;
    margin-bottom: 8px; /* Reduced from 10px */
    font-weight: 500;
    font-size: 14px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive Design */
@media (max-width: 900px) {
    .signup-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .left-side, .right-side {
        padding: 35px 25px; /* Reduced further for mobile */
    }
    
    .left-side h1 {
        font-size: 24px; /* Further reduced for mobile */
        margin-bottom: 30px;
    }
    
    .right-side h2 {
        font-size: 26px; /* Further reduced for mobile */
        margin-bottom: 6px;
    }
    
    .form-subtitle {
        margin-bottom: 25px;
        font-size: 14px;
    }
    
    .signup-form {
        gap: 16px; /* Slightly smaller gap on mobile */
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-top: 8px;
        padding: 15px 10px;
    }
    
    .signup-container {
        margin-top: 8px;
        border-radius: 8px;
    }
    
    .signup-wrapper {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .phone-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .country-code-selector {
        width: 100%;
        margin-bottom: 0;
    }
    
    .left-side, .right-side {
        padding: 25px 20px;
    }
    
    .main-content {
        padding: 12px 8px;
    }
    
    .left-side h1 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .right-side h2 {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 12px 16px;
        height: 46px;
    }
    
    .country-code-selector select {
        padding: 12px 16px;
        height: 46px;
    }
    
    .register-btn {
        padding: 14px;
        height: 48px;
        font-size: 15px;
    }
    
    .login-link {
        margin-top: 18px;
        font-size: 14px;
    }
}

/*Gaps setting by ChatGpt*/
/* Prevent layout shifting when errors appear */
.form-group {
    min-height: 96px;   /* keeps block height stable */
}

/* Lock error message height */
.error-message {
    height: 18px;       /* not min-height */
    line-height: 18px;
    overflow: hidden;
    visibility: hidden;
}

/* When text is added, just show it without moving layout */
.error-message:not(:empty) {
    visibility: visible;
}

/* Remove double spacing source */
.signup-form {
    gap: 18px;
}

.form-group {
    margin-bottom: 0;
}

/* ===========================
   SIGNUP FINAL MOBILE POLISH
=========================== */

@media (max-width: 900px) {

  .signup-container {
    border-radius: 12px;
  }

  /* Center ONLY heading */
  .left-side h1 {
    text-align: justify;
  }

  /* Justify description text */
  .left-side p {
    text-align: justify;
  }

  /* Keep checklist properly LEFT aligned */
  .features-list {
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
  }

  .feature-item {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {

  .signup-wrapper {
    border-radius: 10px;
  }

  .register-btn {
    width: 100%;
  }

  .toggle-password {
    right: 15px;
  }
}