/* 
 * Custom Registration Form Styles
 * File: custom-registration-style.css
 */

/* 1. Scoped Styles */
#signup-form {
    /* You can add overall container styling here if desired */
}

/* 2. Logged-In User Message and Action Buttons */
#signup-form .logged-in-message {
    text-align: center;
    padding: 20px;
}
#signup-form .action-buttons {
    margin-top: 20px;
}
#signup-form .action-buttons .btn {
    background-color: #F8A831;
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}
#signup-form .action-buttons .btn:hover {
    background-color: #d48829;
}

/* 3. Floating Label and Form Field Styles */
#signup-form .floating-label-group {
    position: relative;
    margin-bottom: 10px;
    grid-column: span 1;
}
#signup-form .floating-label-group input,
#signup-form .floating-label-group select {
    border: 1px solid #D9D9D9;
    border-radius: 4px;
    background-color: transparent;
    font-size: 15px;
    width: 100%;
    height: 3.75em;
    transition: all 0.3s ease-in-out;
    padding-top: 15px;
}
#signup-form .floating-label-group label {
    position: absolute;
    top: 15px;
    left: 10px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease-in-out;
    padding: 0 4px;
    pointer-events: none;
}
#signup-form .floating-label-group input:focus ~ label,
#signup-form .floating-label-group input:not(:placeholder-shown) ~ label,
#signup-form .floating-label-group select:focus ~ label,
#signup-form .floating-label-group select:not([value=""]) ~ label {
    top: 5px;
    left: 10px;
    font-size: 13px;
    color: #a9a9a9;
}
#signup-form .floating-label-group input:focus,
#signup-form .floating-label-group select:focus {
    border: 2px solid #F8A831;
}

/* 4. Error State Styling */
#signup-form .floating-label-group.error input,
#signup-form .floating-label-group.error select {
    border-color: red !important;
}
#signup-form .floating-label-group.error label {
    color: red !important;
}
#signup-form .floating-label-group .error-message {
    bottom: -18px;
    left: 44px;
    font-size: 12px;
    color: red;
}

/* 5. Icon Styling */
#signup-form .icon-container,
#signup-form .icon-container-left,
#signup-form .icon-container-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
#signup-form .icon-show-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
}
#signup-form .fixed-prefix {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #000;
    pointer-events: none;
}

/* 6. Form Layout and Responsiveness */
#signup-form .form-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
}
#signup-form .col-span-2 {
    grid-column: span 2;
}
#signup-form .tos-container {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}
@media (max-width: 768px) {
    #signup-form .form-container {
        grid-template-columns: 1fr;
        padding: 0;
        grid-gap: 0;
    }
    #signup-form .col-span-2,
    #signup-form .tos-container {
        grid-column: span 1;
    }
}

/* 7. Button Styling */
#signup-form .btn {
    background-color: #F8A831;
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}
#signup-form .btn:hover {
    background-color: #d48829;
}

/* 8. Terms of Service (TOS) Styling */
#signup-form .tos-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    appearance: none;
    border: 2px solid #000;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, border-color 0.3s;
}
#signup-form .tos-checkbox:checked {
    background-color: #F8A831;
    border-color: #F8A831;
}
#signup-form .tos-checkbox:checked::before {
    content: '✔';
    color: white;
    font-size: 14px;
}
#signup-form .tos-label {
    padding: 7px 0 0 5px;
}
#signup-form .tos-link {
    color: #1800a3;
    text-decoration: underline;
    transition: text-decoration 0.3s;
}
#signup-form .tos-link:hover {
    text-decoration: underline;
}

/* 9. Contact Number Field Adjustments */
#signup-form #billing_phone {
    padding-left: 30px;
    padding-right: 40px;
    height: 44px;
    line-height: 44px;
}

/* 10. Loader Animation */
#signup-form .loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #F8A831;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 9999;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 11. Toaster Notification Styling */
#signup-form .toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    font-size: 17px;
    transition: visibility 0s, opacity 0.5s linear;
    opacity: 0;
}
#signup-form .toast.show {
    visibility: visible;
    opacity: 1;
    animation: fadein 0.5s, fadeout 0.5s 3.5s;
}
@keyframes fadein {
    from { top: 0; opacity: 0; }
    to { top: 20px; opacity: 1; }
}
@keyframes fadeout {
    from { top: 20px; opacity: 1; }
    to { top: 0; opacity: 0; }
}

/* 12. Blurred Form When Loader is Active */
#signup-form .blurred {
    filter: blur(4px);
    opacity: 0.5;
    pointer-events: none;
}

/* Shake Animation for invalid fields */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.shake {
  animation: shake 0.5s;
}
