/*
 * Plugin Name: AdPageX
 * Description: Styles for AdPageX admin pages
 * Version: 1.0
 */

.adpagex-container {
    margin-top: 20px;
    margin-right: 20px;
}

.adpagex-header {
    background: linear-gradient(135deg, #4a90e2, #7c4dff);
    padding: 20px;
    border-radius: 5px 5px 0 0;
    color: white;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adpagex-header h1 {
    color: white;
    margin: 0;
    font-weight: 400;
}

.adpagex-logo {
    max-height: 50px;
    vertical-align: middle;
    margin-right: 15px;
}

.adpagex-version {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-left: 15px;
}

.adpagex-card {
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.adpagex-card-header {
    background: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    font-size: 16px;
}

.adpagex-card-content {
    padding: 20px;
}

.adpagex-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.adpagex-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    transition: all 0.2s ease;
}

.adpagex-tab.active {
    border-bottom: 2px solid #4a90e2;
    color: #4a90e2;
}

.adpagex-tab-content {
    display: none;
}

.adpagex-tab-content.active {
    display: block;
}

.adpagex-button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: background 0.3s;
    text-decoration: none; /* For anchor tags styled as buttons */
    display: inline-block; /* For anchor tags styled as buttons */
}

.adpagex-button:hover {
    background: #3a80d2;
    color: white; /* Ensure text color remains white on hover */
}

.adpagex-button.danger {
    background: #e74c3c;
}

.adpagex-button.danger:hover {
    background: #c0392b;
}

.adpagex-button.success {
    background: #2ecc71;
}

.adpagex-button.success:hover {
    background: #27ae60;
}

.adpagex-table {
    width: 100%;
    border-collapse: collapse;
}

.adpagex-table th {
    text-align: left;
    padding: 12px 15px;
    background: #f5f5f5;
    font-weight: 500;
}

.adpagex-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.adpagex-table tr:last-child td {
    border-bottom: none;
}

.adpagex-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.adpagex-status-active {
    background: #e3f2fd;
    color: #2196f3;
}

.adpagex-status-inactive {
    background: #f5f5f5;
    color: #757575;
}

.adpagex-description {
    line-height: 1.5;
    color: #666;
    margin-top: 0;
}

.adpagex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 15px 0;
}

@media (max-width: 768px) {
    .adpagex-grid {
        grid-template-columns: 1fr;
    }
}

.adpagex-grid-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
}

.adpagex-container .notice {
    color: #000;
}

.adpagex-actions {
    display: flex;
    gap: 5px;
}

.adpagex-form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
.adpagex-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 20px;
}
.adpagex-card-header {
    background: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    font-size: 16px;
}
.adpagex-card-content {
    padding: 20px;
}

/* Form Layout */
.adpagex-form-row {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}
.adpagex-form-group {
    flex: 1;
    min-width: 250px;
    margin: 10px 20px 0 20px;
}
.adpagex-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.adpagex-form-group input[type="text"],
.adpagex-form-group input[type="number"],
.adpagex-form-group select {
    width: 100%;
    max-width: 400px;
}
.section-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin: 25px 0 15px;
    font-size: 16px;
}
.section-subtitle {
    margin-bottom: 10px;
    font-weight: 500;
}

/* Checkbox Grid */
.checkbox-container {
    flex: 100%;
}
.adpagex-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.adpagex-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.devices-group {
    margin-top: 10px;
    margin-left: 25px;
}

/* Collapsible Sections */
.adpagex-section {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.adpagex-section h3.section-title {
    margin: 0;
    padding: 12px 15px;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    position: relative;
}
.toggle-icon {
    position: absolute;
    right: 15px;
    font-weight: bold;
    transition: transform 0.3s;
}
.adpagex-section.collapsed .toggle-icon {
    transform: rotate(0deg);
}
.adpagex-section:not(.collapsed) .toggle-icon {
    transform: rotate(45deg);
}
.section-content {
    padding: 15px;
    display: none;
}
.adpagex-section:not(.collapsed) .section-content {
    display: block;
}

/* Code display */
code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 13px;
}

/* Form actions */
.adpagex-form-actions {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.adpagex-mb-10 {
    margin-bottom: 10px;
}
