/* PublishToAll Styles - Matching Lexaya Theme */

:root {
    --primary: #1e40af;
    --secondary: #3b82f6;
    --bg: #ffffff;
    --text: #1e40af;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px dashed var(--border);
}

.logo {
    display: inline-block;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.logo:hover {
    color: var(--primary);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid var(--primary);
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

/* Accounts Grid */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.account-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
}

.account-card.connected {
    border-color: var(--success);
}

.account-icon {
    font-size: 2rem;
}

.account-info {
    flex: 1;
}

.account-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.account-info p {
    font-size: 0.875rem;
    color: var(--text-light);
}

.account-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

.account-status.connected {
    background: #dcfce7;
    color: #166534;
}

.account-status.disconnected {
    background: #fee2e2;
    color: #991b1b;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    display: block;
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    text-align: center;
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.action-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.action-card p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    align-items: center;
}

.post-thumbnail {
    width: 80px;
    height: 80px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail video,
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info {
    flex: 1;
}

.post-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-platforms {
    display: flex;
    gap: 0.5rem;
}

.platform-badge {
    font-size: 1.2rem;
}

.post-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-status.published {
    background: #dcfce7;
    color: #166534;
}

.post-status.scheduled {
    background: #fef3c7;
    color: #92400e;
}

.post-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Auth Required */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.auth-required .card {
    max-width: 400px;
}

.auth-required h2 {
    margin-bottom: 1rem;
}

.auth-required p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

.upload-zone.has-file {
    border-style: solid;
    border-color: var(--success);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-zone h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Video Preview */
.video-preview {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Platform Checkboxes */
.platforms-select {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.platform-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.platform-checkbox:hover {
    border-color: var(--primary);
}

.platform-checkbox.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.platform-checkbox.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.platform-checkbox input {
    display: none;
}

.platform-checkbox .icon {
    font-size: 1.5rem;
}

.platform-checkbox .name {
    font-weight: 500;
}

/* Connect Page */
.connect-grid {
    display: grid;
    gap: 1rem;
}

.connect-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
}

.connect-card .icon {
    font-size: 3rem;
}

.connect-card .info {
    flex: 1;
}

.connect-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.connect-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.connect-card .status {
    text-align: right;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .platforms-select {
        flex-direction: column;
    }

    .connect-card {
        flex-direction: column;
        text-align: center;
    }

    .connect-card .status {
        text-align: center;
    }
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.month-nav h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.month-nav .btn {
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
    min-width: 36px;
}

.calendar-grid,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-light);
    padding: 0.25rem;
}

.calendar-days {
    margin-top: 0.25rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 2px solid transparent;
    position: relative;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day:not(.empty) {
    background: #f8fafc;
}

.calendar-day:not(.empty):hover {
    background: #f1f5f9;
}

.calendar-day.today {
    border-color: var(--primary);
    background: #eff6ff;
}

.calendar-day.has-post {
    background: transparent;
}

.day-number {
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1;
}

.post-emoji {
    font-size: 0.9rem;
    line-height: 1;
    margin-top: 1px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--border);
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-light);
}

.legend-emoji {
    font-size: 1rem;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 2px solid var(--primary);
    background: #eff6ff;
}

@media (max-width: 640px) {
    .calendar-container {
        padding: 0.75rem;
        max-width: 100%;
    }

    .month-nav h2 {
        font-size: 1rem;
    }

    .calendar-grid,
    .calendar-days {
        gap: 0.2rem;
    }

    .calendar-header {
        font-size: 0.65rem;
        padding: 0.2rem;
    }

    .day-number {
        font-size: 0.7rem;
    }

    .post-emoji {
        font-size: 0.75rem;
    }

    .calendar-legend {
        gap: 1rem;
        font-size: 0.75rem;
    }
}
