/* Communication Page Specific Styles */

/* Composition Card */
.comms-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid var(--border);
    margin-bottom: 2rem;
}

.comms-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.comms-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comms-card-title i {
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--light);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--light);
    color: var(--text-dark);
    border-color: var(--text);
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 1;
}

.custom-dropdown.active {
    z-index: 100 !important;
}

.custom-dropdown-btn {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: var(--light);
    transition: all 0.3s ease;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.custom-dropdown-btn:hover,
.custom-dropdown.active .custom-dropdown-btn {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.custom-dropdown-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--text);
}

.custom-dropdown.active .custom-dropdown-btn i {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
    z-index: 100;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
}

.custom-dropdown.active .custom-dropdown-menu {
    display: block;
}

.custom-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--light);
    color: var(--text-dark);
    font-weight: 500;
}

.custom-dropdown-item:last-child {
    border-bottom: none;
}

.custom-dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.custom-dropdown-item.selected {
    background: rgba(220, 38, 38, 0.05);
    color: var(--primary);
    font-weight: 600;
}

/* History List styles */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.history-info {
    flex: 1;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.history-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.history-meta {
    font-size: 0.85rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.maintenance {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.badge.update {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #d1fae5;
}

.badge.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.badge.warning {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .history-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}