/**
 * Customer Frontend Styles
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    color: #2c3e50;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: #f0f0f0;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status */
.status {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.status--idle {
    background: #e9ecef;
    color: #495057;
}

.status--success {
    background: #d4edda;
    color: #155724;
}

.status--error {
    background: #f8d7da;
    color: #721c24;
}

.status--loading {
    background: #d1ecf1;
    color: #0c5460;
}

/* Main Content */
.main-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.brand-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    transition: box-shadow 0.2s;
}

.brand-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.brand-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.brand-id {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
}

.brand-description {
    margin-bottom: 15px;
    color: #495057;
}

.brand-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    gap: 15px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading-state i {
    margin-right: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state p {
    margin-bottom: 10px;
}

.text-muted {
    color: #6c757d;
    font-size: 14px;
}

/* Error State */
.error-state {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-top: 20px;
}

/* Button Styles */
.button {
    background-color: #ff9900;
    color: #111827;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    margin-top: 12px;
}

.button:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

.button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 153, 0, 0.35);
}

/* Profile picker (Ads OAuth when multiple accounts) */
.profile-picker {
    margin-top: 16px;
}
.profile-picker-title {
    margin-bottom: 12px;
    color: #333;
}
.profile-list {
    list-style: none;
    margin-bottom: 16px;
}
.profile-list li {
    margin-bottom: 8px;
}
.profile-list label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.profile-list input[type="radio"] {
    margin: 0;
}

/* Sign-up ToS modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 24px;
}

.modal-panel h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.modal-copy {
    margin-bottom: 16px;
    color: #555;
    font-size: 14px;
}

.tos-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
    margin-bottom: 12px;
}

.tos-check input {
    margin-top: 3px;
    flex-shrink: 0;
}

.tos-check a {
    color: #2563eb;
    text-decoration: underline;
}

.modal-error {
    color: #b91c1c;
    font-size: 13px;
    margin-bottom: 12px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.modal-btn--secondary {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}

.modal-btn--secondary:hover {
    background: #f3f4f6;
}

.modal-btn--primary {
    background: #ff9900;
    border-color: #ff9900;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.25);
}

.modal-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 153, 0, 0.35);
}

.modal-btn--primary:disabled {
    background: #d1d5db;
    border-color: #d1d5db;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
