/*
 * This file is part of the GiDiNet website (www.gidinet.com).
 * Public availability does not imply an open-source license.
 * All rights reserved. Copying, modification or reuse is prohibited
 * without prior written permission.
 */

.settings-panel {
    max-width: 960px;
    margin: 20px auto;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
    font-family: Arial, sans-serif;
}

.settings-panel-header {
    padding: 14px 18px 10px 18px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 10px 10px 0 0;
}

.settings-panel-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: bold;
    color: #ff6600;
}

.settings-panel-subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.settings-panel-body {
    padding: 14px 18px 18px 18px;
}

.settings-nav {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

    .settings-nav a {
        padding: 4px 8px;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        text-decoration: none;
        color: #374151;
        background-color: #ffffff;
    }

        .settings-nav a:hover {
            background-color: #f3f4f6;
        }

.settings-group {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

    .settings-group:first-child {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

.settings-group-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.settings-group-subtitle {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #6b7280;
}

.settings-form-row {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    column-gap: 18px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: flex-start;
}

    .settings-form-row:last-child {
        border-bottom: none;
    }

.settings-form-row-static {
    background-color: #fefefe;
}

.settings-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: right;
    padding-top: 4px;
}

    .settings-form-label label,
    .settings-form-label span {
        display: block;
    }

.settings-form-field {
    font-size: 13px;
    color: #111827;
}

.settings-form-actions {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.settings-form-actions-global {
    position: sticky;
    bottom: 0;
    background-color: #ffffff;
    padding: 12px 18px 14px 18px;
    margin: 20px -18px -18px -18px;
    border-top: 1px solid #e5e7eb;
    z-index: 10;
}

    .settings-form-actions.has-validation-errors,
    .settings-form-actions-global.has-validation-errors {
        position: sticky;
        bottom: 0;
        background-color: #ffffff;
        padding-bottom: 14px;
        z-index: 10;
    }

.settings-subblock {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.settings-subblock-title {
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.settings-static-value {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 4px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-family: Arial, sans-serif;
    color: #374151;
    box-sizing: border-box;
    vertical-align: middle;
    white-space: nowrap;
}

    .settings-static-value.monospace {
        font-family: Consolas, Menlo, Monaco, monospace;
        word-break: break-all;
    }

    .settings-static-value.multiline {
        white-space: normal;
        height: auto;
        align-items: flex-start;
        padding-top: 4px;
        padding-bottom: 4px;
    }

.settings-radio-group label {
    display: block;
    margin-bottom: 2px;
}

    .settings-radio-group label:last-child {
        margin-bottom: 0;
    }

.dashboard-input {
    height: 30px;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    vertical-align: middle;
    box-sizing: border-box;
    background-color: #fff;
    color: #000;
    line-height: normal;
    margin-right: 8px;
}

    .dashboard-input:focus {
        border-color: #4a90e2;
        box-shadow: 0 0 3px rgba(74, 144, 226, 0.4);
        outline: none;
    }

.dashboard-button {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    background-color: #426184;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 6px;
    transition: background-color 0.2s;
}

    .dashboard-button:hover {
        background-color: #2e4865;
    }

    .dashboard-button.primary {
        background-color: #ff6600;
    }

        .dashboard-button.primary:hover {
            background-color: #cc5200;
        }

    .dashboard-button.secondary {
        background-color: #e0e0e0;
        color: #333;
        border: 1px solid #ccc;
    }

        .dashboard-button.secondary:hover {
            background-color: #d5d5d5;
            border-color: #bbb;
            color: #000;
        }

.secondary-button {
    background-color: #f3f4f6;
    color: #374151;
}

    .secondary-button:hover {
        background-color: #e5e7eb;
    }

.multi-address-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 360px;
}

.multi-address-list {
    width: 100%;
    box-sizing: border-box;
}

.multi-address-add-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.small-button {
    padding: 4px 10px;
    font-size: 12px;
}

.small-input {
    height: 28px;
    font-size: 13px;
}

.dob-field {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dob-part {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dob-part-label {
    font-size: 11px;
    color: #6b7280;
}

.dob-input {
    width: 60px;
    box-sizing: border-box;
}

.dob-input-year {
    width: 80px;
}

.dob-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}

.radio-group {
    border: none;
    padding: 0;
    margin: 0;
}

.radio-group-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #00457c;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 6px;
    line-height: 1.4;
}

    .radio-option input[type="radio"] {
        margin-top: 3px;
    }

    .radio-option span {
        font-size: 13px;
        color: #111;
    }

/* Box istruzioni */
.settings-instructions {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    margin: 18px 18px 0 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.settings-instructions-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
    color: #2563eb;
    flex: 0 0 auto;
}

.settings-instructions-content {
    flex: 1;
    min-width: 0;
}

.settings-instructions-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #1f2937;
}

.settings-instructions p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.45;
}

.settings-instructions ul {
    margin: 6px 0 0 18px;
    padding: 0;
    font-size: 13px;
    color: #374151;
}

.settings-instructions li {
    margin-bottom: 4px;
    line-height: 1.45;
}

/* ServiceOptionRadio */
.service-option-radio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.service-option-radio {
    width: 100%;
    margin: 0;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

/* Width helpers */
.form-width-sm,
.service-option-radio-width-sm {
    width: 100%;
    max-width: 360px;
}

.form-width-md,
.service-option-radio-width-md {
    width: 100%;
    max-width: 420px;
}

.form-width-lg,
.service-option-radio-width-lg {
    width: 100%;
    max-width: 520px;
}

.service-option-radio:hover {
    border-color: #9ca3af;
}

.service-option-radio.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.service-option-radio.is-disabled {
    opacity: 0.65;
}

.service-option-radio-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.service-option-radio.is-disabled .service-option-radio-inner {
    cursor: not-allowed;
}

.service-option-radio-selector {
    flex: 0 0 auto;
    padding-top: 2px;
}

    .service-option-radio-selector input[type="radio"] {
        margin: 0;
    }

.service-option-radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.service-option-radio-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.service-option-radio-description {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    color: #374151;
}

.service-option-radio-secondary {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.service-option-radio-link {
    display: inline-block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

    .service-option-radio-link:hover {
        text-decoration: underline;
    }

/* Nameserver block */
.nameserver-mode-list {
    margin-bottom: 18px;
}

.custom-nameserver-block {
    max-width: 360px;
}

.nameserver-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.nameserver-grid-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nameserver-label {
    display: block;
    font-size: 12px;
    color: #4b5563;
}

.field-error {
    border-color: #dc2626 !important;
}

.label-error {
    color: #b91c1c;
}

.toast-container-local {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    pointer-events: none;
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    opacity: 0.95;
}

.toast-error {
    background-color: #e74c3c;
}

@media (max-width: 800px) {
    .settings-form-row {
        grid-template-columns: 1fr;
    }

    .settings-form-label {
        text-align: left;
        padding-top: 0;
        margin-bottom: 4px;
    }

    .settings-panel {
        margin: 10px;
    }

    .settings-instructions {
        margin: 12px 12px 0 12px;
        padding: 14px;
    }

    .settings-form-actions {
        justify-content: flex-start;
    }

    .settings-form-actions-global {
        margin-left: -12px;
        margin-right: -12px;
        margin-bottom: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .service-option-radio-list,
    .custom-nameserver-block {
        max-width: 100%;
    }
}

.multi-address-list-row {
}

.multi-address-actions-row {
}

.settings-link-inline {
    margin-left: 6px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

    .settings-link-inline:hover {
        text-decoration: underline;
    }

.settings-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}

    .settings-checkbox input[type="checkbox"] {
        margin-top: 2px;
    }

.settings-label-with-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.domain-list-textarea {
    height: 220px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.settings-label-with-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.act-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #2563eb;
    text-decoration: none;
    border-radius: 999px;
}

    .act-info:hover {
        background: #eff6ff;
    }

    .act-info.is-disabled {
        opacity: 0.45;
        pointer-events: none;
        cursor: default;
    }

    .act-info .gtable-icon {
        width: 14px;
        height: 14px;
    }