/* Propose and Second Motion Styling */
:root {
    --propose-primary: #10b981;
    --propose-secondary: #f59e0b;
    --propose-accent: #ef4444;
    --propose-neutral: #6b7280;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Propose Second Table Styling */
.propose-second-wrapper {
    width: 100%;
    padding: 0;
    overflow-x: auto;
}

#dt_DirectorVotingResults {
    width: 100%;
}

#dt_DirectorVotingResults thead {
    background-color: #f3f4f6;
}

#dt_DirectorVotingResults thead th {
    padding: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

#dt_DirectorVotingResults tbody td {
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.motion-row {
    transition: background-color 0.2s ease;
}

.motion-row:hover {
    background-color: #f9fafb;
}

.motion-number {
    font-weight: 600;
    width: 3rem;
    text-align: center;
}

.motion-text {
    text-align: left;
}

.motion-status {
    text-align: center;
}

.motion-action {
    text-align: center;
    white-space: nowrap;
}

/* Status Column Badges */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: capitalize;
}

.status-proposed-seconded {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-proposed {
    background: #fed7aa;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.status-open {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}


/* Propose/Second Button Styling */
.raiseHandSecondPropose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.raiseHandSecondPropose::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.raiseHandSecondPropose:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.raiseHandSecondPropose:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.raiseHandSecondPropose:active:not(:disabled) {
    transform: translateY(0);
}

.raiseHandSecondPropose:disabled,
.raiseHandSecondPropose.participated {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.raiseHandSecondPropose.participated {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    cursor: default;
}

.raiseHandSecondPropose.participated:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.raiseHandSecondPropose span {
    position: relative;
    z-index: 1;
}

.raiseHandSecondPropose .icon {
    font-size: 1rem;
}

/* Participated State Icon */
.raiseHandSecondPropose.participated::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: none;
}

.raiseHandSecondPropose.participated {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}



/* Empty State Styling */
.propose-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.propose-empty-state i {
    font-size: 3.5rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
}

.propose-empty-state h5 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.propose-empty-state p {
    color: #9ca3af;
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

/* User Participation Indicator */
.participation-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.participation-indicator.you {
    background: #dbeafe;
    color: #0c4a6e;
    border: 1px solid #bfdbfe;
}

.participation-indicator i {
    font-size: 0.9rem;
}

/* Action Confirmation Toast/Alert */
.propose-action-alert {
    animation: slideInDown 0.4s ease-out;
    margin-bottom: 1.5rem;
}

.propose-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.propose-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #0c2340;
}

.propose-warning {
    background: #fed7aa;
    border: 1px solid #fbbf24;
    color: #92400e;
}

/* Loading State */
.propose-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .propose-second-wrapper {
        padding: 0 0.5rem;
    }

    #dt_DirectorVotingResults {
        font-size: 0.9rem;
    }

    #dt_DirectorVotingResults thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    #dt_DirectorVotingResults tbody td {
        padding: 0.75rem 0.5rem;
    }

    .motion-text {
        font-size: 0.9rem;
    }

    .raiseHandSecondPropose {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .raiseHandSecondPropose .icon {
        font-size: 0.85rem;
    }

    .status-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .propose-second-wrapper {
        padding: 0;
    }

    /* Stack table more compactly on mobile */
    #dt_DirectorVotingResults {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    #dt_DirectorVotingResults thead {
        display: none;
    }

    #dt_DirectorVotingResults tbody,
    #dt_DirectorVotingResults tr,
    #dt_DirectorVotingResults td {
        display: block;
        width: 100%;
    }

    #dt_DirectorVotingResults tbody {
        margin: 0;
    }

    #dt_DirectorVotingResults tr {
        margin-bottom: 1.5rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: visible;
        box-shadow: var(--shadow-sm);
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }

    #dt_DirectorVotingResults td {
        padding: 0.75rem !important;
        text-align: left;
        position: relative;
        border: none;
        border-bottom: 1px solid #f3f4f6;
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
    }

    #dt_DirectorVotingResults td:last-child {
        border-bottom: none;
    }

    /* Add labels for mobile view */
    #dt_DirectorVotingResults td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: #374151;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.5rem;
        color: #6b7280;
    }

    .motion-number {
        font-size: 1.1rem;
        font-weight: 600;
        width: 100%;
        text-align: left;
        border-bottom: 2px solid #e5e7eb;
        padding: 1rem 0.75rem !important;
    }

    .motion-number::before {
        content: '';
        display: none;
    }

    .motion-text {
        font-size: 0.95rem;
        line-height: 1.5;
        font-weight: 500;
        color: #1f2937;
    }

    .motion-text::before {
        content: 'Motion';
    }

    .motion-status {
        text-align: left;
        display: flex;
        flex-direction: column;
    }

    .motion-status::before {
        content: 'Status';
    }

    .motion-action {
        text-align: left;
        white-space: normal;
        display: flex;
        flex-direction: column;
    }

    .motion-action::before {
        content: 'Action';
    }

    .status-badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        display: inline-block;
        white-space: normal;
        line-height: 1.4;
        width: fit-content;
    }

    .raiseHandSecondPropose {
        width: 100%;
        padding: 0.85rem 1rem !important;
        justify-content: center;
        font-size: 0.9rem;
        border-radius: 6px;
        gap: 0.5rem;
    }

    .raiseHandSecondPropose .icon {
        font-size: 0.95rem;
    }

    .raiseHandSecondPropose .btn-text {
        display: inline;
    }

    .raiseHandSecondPropose.participated {
        width: 100%;
        padding: 0.85rem 1rem !important;
    }

    /* Alert styling for mobile */
    .alert {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        margin-bottom: 1.5rem;
    }

    .alert > div {
        flex-direction: column;
        gap: 0.5rem;
    }

    .alert i {
        font-size: 1rem;
    }

    .alert strong {
        font-size: 0.95rem;
    }

    .alert span {
        font-size: 0.9rem;
    }

    .card {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        margin-top: 1rem;
        border: none;
        border-top: 4px solid #3b82f6;
    }

    .card-body {
        padding: 1rem;
    }

    .card-body h6 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .card-body p {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .card-body p i {
        margin-right: 0.5rem;
        font-size: 0.8rem;
    }

    .propose-empty-state {
        padding: 2rem 1rem;
    }

    .propose-empty-state i {
        font-size: 2.5rem;
    }

    .propose-empty-state h5 {
        font-size: 1rem;
    }

    .propose-empty-state p {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    #dt_DirectorVotingResults {
        font-size: 0.8rem;
    }

    #dt_DirectorVotingResults td {
        padding: 0.65rem 0.75rem !important;
    }

    #dt_DirectorVotingResults td::before {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }

    .motion-number {
        font-size: 1rem;
        padding: 0.9rem 0.75rem !important;
    }

    .motion-text {
        font-size: 0.9rem;
    }

    .status-badge {
        padding: 0.45rem 0.6rem;
        font-size: 0.75rem;
    }

    .raiseHandSecondPropose {
        padding: 0.75rem 0.9rem !important;
        font-size: 0.85rem;
    }

    .raiseHandSecondPropose .icon {
        font-size: 0.85rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-body h6 {
        font-size: 0.9rem;
    }

    .card-body p {
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
