/* Profile page */

#profile-section .btn-action,
#profile-section .btn-danger {
    width: fit-content;
    margin-left: auto;
}

#profile-section form {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

#profile-section form h3,
#profile-section form .email,
#profile-section form .language,
#profile-section form button,
#profile-section form hr {
    grid-column: 1 / -1;
}

#profile-section form h3 {
    margin-bottom: 5px;
    margin-left: 4px;
}

#danger-zone {
    border: 1px solid #c0392b44;
    border-radius: 8px;
    padding: 20px 24px;
    background: #c0392b0d;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#danger-zone h3 {
    color: #e74c3c;
    margin-bottom: 0;
}

#danger-zone p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

#danger-zone .btn-danger {
    width: fit-content;
    margin-left: auto;
}

/* Page abonnement */

#subscription-storage section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

section .title {
    align-items: center;
    gap: 5px;
}

#subscription-storage section .title i {
    background: var(--active_bg);
    border-radius: 10px;
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#subscription-storage .storage {
    flex: 3;
    min-width: 500px;
}

#subscription-storage .storage-info {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

#subscription-storage .storage-info b {
    font-weight: 600;
    font-size: 25px;
}

#subscription-storage .storage .progress {
    width: 100%;
    height: 10px;
}

#subscription-storage .storage .dot1::before,
#subscription-storage .storage .dot2::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    color: var(--color-text-secondary);
}

#subscription-storage .storage .dot1::before {
    background: var(--blue1);
}

#subscription-storage .storage .dot2::before {
    background: #0092b888;
}

#subscription-storage .storage .description {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 10px;
    font-style: italic;
}

#subscription-storage .storage .storage-breakdown {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 6px;
}

#subscription-storage .storage-details {
    flex: 2;
    min-width: 300px;
}

#subscription-storage .storage-details table {
    width: 100%;
}

#subscription-storage .storage-details table td {
    padding: 5px 10px;
    white-space: nowrap;
    color: var(--color-text-secondary);
}

#subscription-storage .storage-details table td:nth-child(2) {
    max-width: 100%;
    width: 300px;
}

#subscription-storage .storage-details table .progress {
    width: 100%;
    height: 5px;
}

#subscription-storage h4 {
    margin-bottom: 15px;
    margin-top: 25px;
}

#subscription-storage .plans-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

#subscription-storage .card {
    min-width: 0;
    position: relative;
}

#subscription-storage .storage-more-contact {
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

#subscription-storage .storage-more-contact i {
    flex-shrink: 0;
    color: var(--blue1);
}

#subscription-storage .scheduled-billing-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    line-height: 1.45;
}

#subscription-storage .scheduled-cleanup-link {
    color: var(--color-text) !important;
    font-weight: 600;
}

#subscription-storage .btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-link);
    cursor: pointer;
    font-size: inherit;
}

#subscription-storage .btn-link:hover {
    color: var(--color-link-hover);
}

#modal-contact input,
#modal-contact select,
#modal-contact textarea {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    outline: none;
    width: 100%;
    color: var(--color-text);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#modal-contact input:focus,
#modal-contact select:focus,
#modal-contact textarea:focus {
    border-color: var(--active_color);
}

#modal-contact textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

#modal-contact .modal-contact__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 560px) {
    #modal-contact .modal-contact__row {
        grid-template-columns: 1fr;
    }
}

#subscription-storage .card.current {
    border: 1px solid var(--blue3);
}

#subscription-storage .card .badge-current {
    background: var(--blue3);
    color: var(--color-text);
    padding: 5px 10px;
    border-radius: 15px;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

#subscription-storage .card p {
    color: var(--color-text-secondary);
}

#subscription-storage .card .storage-plan-note {
    font-size: 13px;
    margin: 8px 0 12px;
}

#subscription-storage .card b {
    font-weight: 600;
    font-size: 25px;
    color: var(--color-text);
}

#subscription-storage .card ul li {
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

#subscription-storage .card ul li i {
    color: var(--blue1);
}

#subscription-storage .billing-history {
    margin-top: 24px;
}

#subscription-storage .billing-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

#subscription-storage .billing-history .table-wrapper {
    margin-top: 12px;
    overflow: visible;
}

#subscription-storage .billing-table td {
    vertical-align: middle;
}

#subscription-storage .billing-table th,
#subscription-storage .billing-table td {
    white-space: normal;
}

#subscription-storage .billing-table .billing-number {
    color: var(--color-text);
    font-weight: 600;
    overflow-wrap: anywhere;
}

#subscription-storage .billing-payment {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#subscription-storage .billing-amount {
    color: var(--color-text);
    font-weight: 600;
}

#subscription-storage .billing-table .billing-actions-col {
    text-align: right;
}

#subscription-storage .billing-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

#subscription-storage .billing-actions .btn-sm {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#subscription-storage .billing-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1;
    background: var(--bg-secondary);
    color: var(--color-text-secondary);
}

#subscription-storage .billing-status-paid {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.12);
}

.downgrade-cleanup {
    gap: 18px;
}

.downgrade-cleanup .downgrade-cleanup-heading {
    align-items: flex-start;
    gap: 16px;
}

.downgrade-cleanup .downgrade-cleanup-heading .btn {
    margin-left: auto;
    white-space: nowrap;
}

.downgrade-cleanup-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.downgrade-cleanup-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-section);
}

.downgrade-cleanup-card--danger {
    border-color: rgba(231, 76, 60, 0.35);
}

.downgrade-cleanup-card span,
.downgrade-cleanup .billing-cleanup-footer p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.downgrade-cleanup-card strong {
    color: var(--color-text);
    font-size: 22px;
}

.downgrade-cleanup-card--danger strong {
    color: #e74c3c;
}

.downgrade-cleanup-selection-panel {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px !important;
}

.downgrade-cleanup-selection-label {
    display: block;
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-bottom: 6px;
}

.downgrade-cleanup-selection-panel strong {
    font-size: 24px;
    color: var(--color-text);
}

.downgrade-cleanup-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.downgrade-cleanup-progress progress {
    width: 100%;
    height: 10px;
}

.downgrade-cleanup-progress p,
.downgrade-cleanup .billing-cleanup-footer p {
    margin: 0;
}

.downgrade-cleanup-progress .is-ready,
.downgrade-cleanup .billing-cleanup-footer .is-ready {
    color: #2ecc71;
}

.downgrade-cleanup .billing-cleanup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.downgrade-cleanup .actions {
    justify-content: flex-end;
    gap: 10px;
}

.downgrade-cleanup .downgrade-select-col {
    width: 72px;
}

.downgrade-cleanup .downgrade-case-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.downgrade-cleanup .downgrade-case-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.downgrade-cleanup .downgrade-cases-table tr.is-selected {
    background: var(--active_bg);
}

.downgrade-cleanup .downgrade-cases-table tr.is-selected td:first-child {
    border-left: 3px solid var(--active_color);
}

.downgrade-cleanup .logs-per-page {
    flex-shrink: 0;
}

.downgrade-cleanup .logs-per-page select,
.downgrade-cleanup .logs-per-page .chosen-widget {
    min-width: 76px;
}

.downgrade-cleanup .logs-per-page .chosen-trigger {
    min-width: 76px;
}

.downgrade-cleanup .downgrade-cases-table th,
.downgrade-cleanup .downgrade-cases-table td {
    white-space: normal;
}

.downgrade-cleanup .downgrade-cases-table td:first-child,
.downgrade-cleanup .downgrade-cases-table th:first-child {
    text-align: center;
}

.downgrade-cleanup button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .downgrade-cleanup-overview,
    .downgrade-cleanup-selection-panel,
    .downgrade-cleanup .billing-cleanup-footer {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .downgrade-cleanup .downgrade-cleanup-heading {
        flex-direction: column;
    }

    .downgrade-cleanup .downgrade-cleanup-heading .btn {
        margin-left: 0;
    }
}

/* Page événements et sessions */

#events-storage .btn-action {
    margin-left: auto;
    height: fit-content;
}

#events-storage .card {
    padding: 0;
}

#events-storage .card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

#events-storage h3 {
    font-size: 18px;
}

#events-storage .card-header:not(.is-expanded) {
    border-bottom: none;
}

#events-storage .card-header > i:first-child {
    margin-bottom: auto;
    transition: transform 0.2s ease;
}

#events-storage .card-header.is-expanded > i:first-child {
    transform: rotate(90deg);
}

#events-storage .card-header > i:not(:first-child) {
    margin-bottom: auto;
}

#events-storage .card-header .ph-calendar {
    font-size: 24px;
    color: var(--blue1);
}

#events-storage .info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#events-storage h4,
#events-storage h5 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

#events-storage .info p {
    font-size: 13px;
    color: var(--color-text-secondary);
}

#events-storage .info span {
    font-size: 13px;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: row;
    align-items: center;
}

#events-storage .badge-active {
    background: #0009;
    color: var(--color-text) !important;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 11px !important;
}

#events-storage .badge-inactive {
    background: var(--color-text) !important;
    color: #0009 !important;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 11px !important;
}

#events-storage .btn-secondary {
    position: relative;
    height: fit-content;
    font-size: 13px;
    padding: 10px;
}

#events-storage .btn-secondary i {
    margin: 0;
    font-size: 15px;
}

#events-storage .card .btn.add {
    margin-left: auto;
    gap: 7px;
    color: var(--blue1);
}

#events-storage .btn.enable {
    color: #0a9d62;
}

#events-storage .btn.disable {
    color: var(--color-text-secondary);
}

#events-storage .btn.disable::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(-45deg);
    pointer-events: none;
}

#events-storage .btn.delete {
    color: #ff625d;
}

#events-storage .card-body {
    display: none;
    flex-direction: column;
    height: 0;
    transition: all 0.3s ease;
}

#events-storage .card-body .sessions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

#events-storage .session {
    background: var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#events-storage .session .info {
    gap: 5px;
}

#events-storage .session .btn.edit {
    margin-left: auto;
}

#events-storage .session .btn {
    opacity: 0;
}

#events-storage .session:hover .btn {
    opacity: 1;
}

/* Page liens d'upload */

#upload-links-page .btn-action {
    margin-left: auto;
    height: fit-content;
}

#modal-upload-link-form .label-hint {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: 4px;
    font-weight: 400;
}

#modal-upload-link-form .upload-link-token-row {
    margin-top: 12px;
}

#modal-upload-link-form .upload-link-token {
    display: block;
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    word-break: break-all;
}
