/* ARD Dealer System Plugin Styles */

/* General Styles */
.ard-notice {
    padding: 12px 15px;
    margin: 20px 0;
    border-left: 4px solid;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.ard-notice.ard-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.ard-notice.ard-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.ard-notice.ard-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Forms */
.ard-dealer-form-wrapper,
.ard-dealer-list-wrapper,
.ard-lead-list-wrapper {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ard-dealer-form-wrapper h2,
.ard-dealer-list-wrapper h2,
.ard-lead-list-wrapper h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .description {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Buttons */
.btn,
button[type="submit"] {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.btn:hover,
button[type="submit"]:hover {
    background-color: #005a87;
}

.btn.btn-primary {
    background-color: #0073aa;
}

.btn.btn-primary:hover {
    background-color: #005a87;
}

.btn.btn-secondary {
    background-color: #6c757d;
}

.btn.btn-secondary:hover {
    background-color: #5a6268;
}

.btn.btn-danger {
    background-color: #dc3545;
}

.btn.btn-danger:hover {
    background-color: #c82333;
}

.btn.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.btn.btn-copy {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #17a2b8;
    margin-left: 5px;
}

.btn.btn-copy:hover {
    background-color: #138496;
}

/* Tables */
.ard-dealers-table,
.ard-leads-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.ard-dealers-table thead,
.ard-leads-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #ddd;
}

.ard-dealers-table th,
.ard-leads-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ard-dealers-table td,
.ard-leads-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.ard-dealers-table tbody tr:hover,
.ard-leads-table tbody tr:hover {
    background-color: #f5f5f5;
}

.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

/* Status Badges */
.status-badge,
.dealer-status,
.lead-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active,
.status-badge.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive,
.status-badge.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-new,
.status-badge.status-new {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-contacted,
.status-badge.status-contacted {
    background-color: #cfe2ff;
    color: #084298;
}

.status-follow-up,
.status-badge.status-follow-up {
    background-color: #fff3cd;
    color: #664d03;
}

.status-interested,
.status-badge.status-interested {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-not-interested,
.status-badge.status-not-interested {
    background-color: #f8d7da;
    color: #721c24;
}

.status-converted,
.status-badge.status-converted {
    background-color: #d4edda;
    color: #155724;
}

.status-closed,
.status-badge.status-closed {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Referral Link Input */
.referral-link-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    background-color: #f9f9f9;
    margin-right: 5px;
    width: calc(100% - 70px);
}

.copy-referral-link,
.copy-referral-btn {
    padding: 8px 12px;
    font-size: 12px;
    background-color: #17a2b8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-referral-link:hover,
.copy-referral-btn:hover {
    background-color: #138496;
}

/* Admin Form Table */
.ard-dealer-form table.form-table {
    width: 100%;
    margin: 20px 0;
}

.ard-dealer-form table.form-table th {
    width: 200px;
    vertical-align: top;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.ard-dealer-form table.form-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.ard-dealer-form table.form-table input,
.ard-dealer-form table.form-table select,
.ard-dealer-form table.form-table textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.ard-dealer-form table.form-table input:readonly,
.ard-dealer-form table.form-table textarea:readonly {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ard-dealer-form-wrapper,
    .ard-dealer-list-wrapper,
    .ard-lead-list-wrapper {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .table-responsive {
        font-size: 12px;
    }

    .ard-dealers-table,
    .ard-leads-table {
        margin: 10px 0;
    }

    .ard-dealers-table th,
    .ard-leads-table th,
    .ard-dealers-table td,
    .ard-leads-table td {
        padding: 8px;
    }

    .btn,
    button[type="submit"] {
        width: 100%;
        padding: 12px;
        margin: 5px 0;
    }

    .referral-link-input {
        width: 100%;
        margin-bottom: 5px;
    }

    .copy-referral-link,
    .copy-referral-btn {
        width: 100%;
    }
}

/* Dashboard Widget Styles */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget h2 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.widget .big-number {
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
    margin: 15px 0;
}

.quick-actions {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-actions a {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #999;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

.p-20 {
    padding: 20px;
}

.border-top {
    border-top: 1px solid #ddd;
}

/* Marina Application Form */
.ard-marina-form-wrap {
    max-width: 880px;
    margin: 24px auto;
}

.ard-marina-form {
    display: grid;
    gap: 28px;
}

.ard-sheet {
    background: #f2f3f4;
    border: 1px solid #d1d5d9;
    border-radius: 6px;
    padding: 28px;
}

.ard-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ard-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ard-logo {
    width: 96px;
    max-height: 52px;
    object-fit: contain;
}

.ard-photo-box {
    width: 126px;
    min-height: 96px;
    border: 1px solid #9aa1a8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    padding: 10px;
    color: #1f2933;
    background: #eceff1;
}

.ard-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.ard-meta-row label {
    font-size: 12px;
    font-weight: 700;
    color: #23313a;
    text-transform: uppercase;
}

.ard-meta-row input {
    margin-top: 4px;
    border: 0;
    border-bottom: 1px solid #8b949e;
    background: transparent;
    padding: 6px 2px;
    width: 100%;
}

.ard-title-block {
    text-align: center;
    margin-bottom: 18px;
}

.ard-title-block h1 {
    margin: 0 0 -8px 0;
    font-size: 64px;
    line-height: 0.85;
    color: #0d5a67;
    font-weight: 800;
    letter-spacing: -1px;
}

.ard-title-block .dot {
    color: #b48d47;
    font-size: 56px;
}

.ard-title-block p {
    margin: 2px 0 10px;
    color: #5a6f7a;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.ard-title-block .phase {
    display: inline-block;
    background: #0d5a67;
    color: #fff;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: 2px;
}

.ard-title-block h2 {
    margin: 18px 0 0;
    text-transform: uppercase;
    font-size: 44px;
    line-height: 1;
    color: #0d5a67;
    font-weight: 800;
}

.ard-option-box {
    border: 1px solid #96a0a8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    background: #f7f8f9;
}

.ard-option-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2933;
    margin: 8px 0 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ard-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.ard-option-grid.preference {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ard-option-grid label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2d36;
}

.ard-section {
    border: 1px solid #96a0a8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    background: #f7f8f9;
}

.ard-section-title {
    margin: -30px auto 14px;
    display: table;
    background: #0d5a67;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 6px 22px;
    border-radius: 4px;
    font-size: 18px;
}

.ard-fields-grid {
    display: grid;
    gap: 10px;
}

.ard-fields-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ard-fields-grid label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: #1f2d36;
}

.ard-fields-grid input[type="text"],
.ard-fields-grid input[type="email"],
.ard-fields-grid input[type="date"],
.ard-fields-grid input[type="file"],
.ard-fields-grid textarea {
    margin-top: 6px;
    width: 100%;
    border: none;
    border-bottom: 1px solid #9aa1a8;
    background: transparent;
    border-radius: 0;
    padding: 8px 2px;
    font-size: 14px;
    color: #2c3e50;
}

.ard-fields-grid .full {
    grid-column: 1 / -1;
}

.ard-terms h3 {
    text-align: center;
    font-size: 36px;
    margin: 6px 0 16px;
    color: #0d5a67;
    text-transform: uppercase;
}

.ard-terms h4 {
    font-size: 20px;
    margin: 20px 0 8px;
    color: #1f2d36;
}

.ard-terms ul {
    margin: 0 0 16px 16px;
    padding: 0;
}

.ard-terms li {
    margin-bottom: 8px;
    color: #27343d;
    font-size: 15px;
}

.ard-sign-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.ard-sign-row label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
}

.ard-sign-row input {
    margin-top: 4px;
    border: 0;
    border-bottom: 1px solid #79848f;
    background: transparent;
    padding: 8px 0;
}

.ard-note-box {
    border-top: 1px solid #c9cfd4;
    margin-top: 16px;
    padding-top: 10px;
}

.ard-consent {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
}

.ard-submit-wrap {
    margin-top: 14px;
}

.ard-submit-wrap .btn {
    min-width: 220px;
    margin: 0;
    background: #0d5a67;
}

.ard-footer-strip {
    margin-top: 22px;
    border-top: 1px solid #c9cfd4;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #1f2d36;
    font-weight: 700;
    font-size: 14px;
}

/* Print Styles */
@media print {
    body * {
        display: none !important;
    }

    .ard-marina-form-wrap,
    .ard-marina-form-wrap * {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .ard-marina-form-wrap {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ard-sheet {
        page-break-inside: avoid;
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 0.5in !important;
        padding: 0.5in !important;
        background: white !important;
    }

    .ard-notice {
        display: none !important;
    }

    .ard-submit-wrap,
    .ard-export-controls {
        display: none !important;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

.ard-export-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 16px;
}

.ard-export-btn {
    padding: 10px 20px;
    border: 1px solid #0d5a67;
    background: #0d5a67;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ard-export-btn:hover {
    background: #0a4655;
    border-color: #0a4655;
}

.ard-export-btn.outline {
    background: transparent;
    color: #0d5a67;
}

.ard-export-btn.outline:hover {
    background: #f0f5f7;
}

@media (max-width: 900px) {
    .ard-title-block h1 {
        font-size: 48px;
    }

    .ard-title-block h2 {
        font-size: 32px;
    }

    .ard-option-grid,
    .ard-option-grid.preference,
    .ard-fields-grid.two-col,
    .ard-sign-row,
    .ard-meta-row {
        grid-template-columns: 1fr;
    }

    .ard-footer-strip {
        flex-direction: column;
    }

    .ard-export-controls {
        flex-direction: column;
    }
}
