/* Pass General Frontend Styles for Shortcode */

/* Form Styles */
.pass-general-form-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pass-general-form-title {
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.pass-general-frontend-form {
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #d63384;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.form-control[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0073aa;
    color: #fff;
}

.btn-primary:hover {
    background-color: #005a87;
}

.btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Messages */
.pass-general-messages {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.pass-general-messages.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pass-general-messages.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pass-general-messages p {
    margin: 0;
}

/* 2-Step Form Styles */
.form-step {
    transition: all 0.3s ease;
}

.form-step h4 {
    margin: 0 0 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.pass-general-password-form,
.pass-general-link-form {
    margin: 0;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Step indicators */
.form-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step-item {
    display: flex;
    align-items: center;
    color: #6c757d;
}

.step-item.active {
    color: #0073aa;
    font-weight: 600;
}

.step-item.completed {
    color: #28a745;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    margin-right: 8px;
    font-size: 14px;
    font-weight: 600;
}

.step-item.active .step-number {
    background: #0073aa;
    color: #fff;
}

.step-item.completed .step-number {
    background: #28a745;
    color: #fff;
}

.step-connector {
    width: 50px;
    height: 2px;
    background: #e9ecef;
    margin: 0 15px;
}

.step-item.completed + .step-item .step-connector {
    background: #28a745;
}

/* Common Styles */
.pass-general-no-links {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.pass-general-links-list,
.pass-general-links-grid,
.pass-general-links-table {
    margin: 20px 0;
}

/* Link Tags and Types */
.link-tag {
    display: inline-block;
    padding: 2px 6px;
    background: #0073aa;
    color: #fff;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 5px;
}

.link-type {
    display: inline-block;
    padding: 2px 6px;
    color: #fff;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 5px;
}

.type-default {
    background: #666;
}

.type-footer {
    background: #d63384;
}

.type-home_bottom {
    background: #198754;
}

/* List Layout */
.pass-general-links-list {
    list-style: none;
    padding: 0;
}

.pass-general-link-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.pass-general-link-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.link-main {
    margin-bottom: 10px;
}

.link-url {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    word-break: break-all;
}

.link-url:hover {
    text-decoration: underline;
}

.link-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.link-meta span {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.link-ip,
.link-pass {
    font-family: monospace;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
}

.link-start-date,
.link-end-date {
    background: #e7f3ff !important;
    color: #0066cc;
}

/* Grid Layout */
.pass-general-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pass-general-link-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pass-general-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 15px;
}

.card-body .link-url {
    display: block;
    font-size: 14px;
    line-height: 1.4;
}

.card-footer {
    background: #f8f9fa;
    padding: 10px 15px;
    border-top: 1px solid #dee2e6;
    font-size: 12px;
    color: #666;
}

.card-footer div {
    margin-bottom: 5px;
}

.card-footer div:last-child {
    margin-bottom: 0;
}

/* Table Layout */
.pass-general-links-table {
    overflow-x: auto;
}

.pass-general-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.pass-general-table th,
.pass-general-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.pass-general-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.pass-general-table tr:hover {
    background: #f8f9fa;
}

.pass-general-table .link-url {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pass-general-form-container {
        margin: 10px 0;
        padding: 15px;
    }

    .pass-general-form-title {
        font-size: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .form-step h4 {
        font-size: 16px;
    }

    .form-step-indicator {
        margin-bottom: 20px;
    }

    .step-connector {
        width: 30px;
        margin: 0 10px;
    }

    .pass-general-links-grid {
        grid-template-columns: 1fr;
    }

    .link-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .pass-general-table {
        font-size: 12px;
    }

    .pass-general-table th,
    .pass-general-table td {
        padding: 8px 10px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .pass-general-form-container {
        padding: 10px;
    }

    .pass-general-form-title {
        font-size: 18px;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 13px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .pass-general-link-item {
        padding: 10px;
    }

    .link-url {
        font-size: 14px;
    }

    .pass-general-links-table {
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    .pass-general-link-item,
    .pass-general-link-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .link-url {
        color: #000;
    }
    
    .pass-general-table {
        box-shadow: none;
    }
}
