﻿/* Cadastro.css - Modern Profile Page Styling */

:root {
    --primary-color: #f7654b;
    --primary-dark: #f7654b;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --secondary-color: #27ae60;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --border-radius: 8px;
    --box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: all 0.3s ease;
}


/* General Container Styling */
.profile-container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Card Styling */
.clube-promocao-card,
.profile-card,
.addresses-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

    .card-header h5 {
        margin: 0;
        font-weight: 600;
        color: var(--dark-color);
    }

        .card-header h5 i {
            color: var(--primary-color);
            margin-right: 0.5rem;
        }

.card-body-cadastro {
    padding: 1.75rem 1.5rem;
}

/* Form Styling */
.form-control {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    height: auto;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    }

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

    .form-group label i {
        color: var(--primary-color);
        margin-right: 0.25rem;
    }

/* Document Card */
.document-card {
    border: 1px dashed #e2e8f0;
    box-shadow: none;
    background-color: #f9fafc;
}

/* Custom Switch */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Button Styling */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn i {
        font-size: 0.95rem;
    }

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
    }

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-outline-primary:hover {
        background-color: var(--primary-color);
        color: white;
    }

.btn-outline-danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

    .btn-outline-danger:hover {
        background-color: var(--danger-color);
        color: white;
    }

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* Address List Styling */
.address-list {
    border-radius: 0;
}

    .address-list .list-group-item {
        border-left: none;
        border-right: none;
        padding: 1rem 1.5rem;
        transition: background-color var(--transition-speed);
    }

        .address-list .list-group-item:first-child {
            border-top: none;
        }

        .address-list .list-group-item:last-child {
            border-bottom: none;
        }

        .address-list .list-group-item:hover {
            background-color: #f9fafc;
        }

.address-info h6 {
    font-weight: 600;
    color: #4a5568;
}

/* Toast Styling */
.toast {
    border-radius: var(--border-radius);
    border: none;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-body {
    padding: 1rem;
    font-weight: 500;
}

/* Alert Styling */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Input Group */
.input-group-append .btn {
    margin-left: 0.5rem;
}

.input-group .form-control {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .profile-container {
        margin: 1rem auto;
    }

    .card-body {
        padding: 1.25rem 1rem;
    }

    .input-group-append {
        flex-direction: column;
        width: 100%;
        margin-top: 0.5rem;
    }

        .input-group-append .btn {
            margin-left: 0;
            margin-top: 0.5rem;
            width: 100%;
        }

    .input-group {
        flex-wrap: wrap;
    }

        .input-group .form-control {
            border-radius: 6px !important;
        }
}

/* Animation Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clube-promocao-card,
.profile-card,
.addresses-card {
    animation: fadeIn 0.4s ease-out forwards;
}

.addresses-card {
    animation-delay: 0.1s;
}


/* Loader for address loading */
.address-loader {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.spinner-border {
    color: var(--primary-color);
}

/* Mantém a página de cadastro alinhada aos cards do checkout. */
.profile-container {
    margin: 1.5rem auto 5rem;
}

.profile-container .profile-card,
.profile-container .addresses-card,
.profile-container .clube-promocao-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.07);
    animation: none;
}

.profile-container .profile-card {
    margin-top: 0 !important;
}

.profile-container .card-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #f7654b;
}

.profile-container .card-header h5 {
    font-size: 1.2rem;
}

.profile-container .card-header h5 > .fa {
    display: inline-block;
    width: 1.25rem;
    margin-right: 0.4rem;
    text-align: center;
}

.profile-container .form-group label > .fa {
    display: inline-block;
    width: 1.1rem;
    margin-right: 0.3rem;
    text-align: center;
    font-size: 0.95rem;
}

.profile-container .btn > .fa {
    width: 1rem;
    text-align: center;
}

.profile-container .profile-vip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.4rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: #fff4f1;
    color: #d94f38;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}

.profile-container .profile-vip .fa {
    margin: 0;
    color: inherit;
}

.profile-container .card-body-cadastro {
    padding: 1.25rem;
}

.profile-container .form-group label {
    color: #2c3e50;
    font-weight: 600;
}

.profile-container .form-control {
    min-height: 44px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background-color: #fff;
    color: #2c3e50;
    font-size: 1rem;
}

.profile-container .form-control:focus {
    border-color: #f7654b;
    box-shadow: 0 0 0 3px rgba(247, 101, 75, 0.15);
}

.profile-container input.form-control:-webkit-autofill,
.profile-container input.form-control:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #2c3e50;
}

.profile-container input.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(247, 101, 75, 0.15);
    -webkit-text-fill-color: #2c3e50;
}

.profile-container .document-card {
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
}

.profile-container .document-card .card-body {
    padding: 1rem;
}

.profile-container .btn {
    min-height: 40px;
    border-radius: 8px;
}

.profile-container .profile-save-button {
    min-height: 46px;
    border-color: #f7654b;
    background: #f7654b;
    color: #fff;
    font-weight: 600;
}

.profile-container .profile-save-button:hover {
    border-color: #e85940;
    background: #e85940;
    color: #fff;
}

.profile-container .btn-secondary {
    border-color: #6c757d;
    background: #6c757d;
    color: #fff;
}

.profile-container .btn-secondary:hover {
    border-color: #545b62;
    background: #5a6268;
}

.profile-container .btn:focus-visible,
.profile-logout .btn:focus-visible {
    outline: 3px solid #f7654b;
    outline-offset: 2px;
}

.profile-container .address-list .list-group-item {
    gap: 1rem;
    padding: 0.85rem 1.25rem;
}

.profile-container .address-info {
    min-width: 0;
}

.profile-container .address-info h6 {
    margin-bottom: 0.15rem !important;
    color: #2c3e50;
}

.profile-container .address-info small {
    display: block;
    color: #6c757d;
    overflow-wrap: anywhere;
}

.profile-container .address-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.4rem;
}

.profile-container .address-actions .btn {
    min-width: 40px;
    margin-right: 0 !important;
}

.profile-container .cupom-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    box-shadow: none !important;
}

.profile-container .cupom-card .text-info {
    color: #d94f38 !important;
}

.profile-logout {
    max-width: 960px;
    margin: 0 auto 5rem !important;
    padding: 0 1rem;
}

@media (max-width: 575px) {
    .profile-container {
        margin-top: 1rem;
        padding: 0 0.75rem;
    }

    .profile-container .card-header {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .profile-container .card-body-cadastro {
        padding: 1rem;
    }

    .profile-container .profile-link-actions {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        width: 100%;
        margin-top: 0.65rem;
    }

    .profile-container .profile-link-actions .btn {
        flex: 1;
        min-width: 0;
        margin: 0;
    }

    .profile-logout {
        padding: 0 0.75rem;
    }
}

.cadastro-copy-feedback {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.cadastro-copy-feedback .toast {
    max-width: 100%;
    min-width: 0;
    pointer-events: none;
}

.cadastro-copy-feedback .toast:not(.show):not(.showing) {
    visibility: hidden;
}

@media (max-width: 991.98px) {
    .cadastro-copy-feedback {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
}
